From eba704b8bb756a91c455483a48d2e3bc30ec15c1 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 25 Apr 2008 11:54:30 +1000 Subject: [PATCH] ntdll: Win64 fix for get_pointer_obfuscator. --- dlls/ntdll/rtl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 1390c64504b..a4d1dacbdb7 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -904,10 +904,10 @@ static DWORD_PTR get_pointer_obfuscator( void ) rand = RtlUniform( &seed ); /* handle 64bit pointers */ - rand ^= RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand ^= (ULONG_PTR)RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); /* set the high bits so dereferencing obfuscated pointers will (usually) crash */ - rand |= 0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand |= (ULONG_PTR)0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); interlocked_cmpxchg_ptr( (void**) &pointer_obfuscator, (void*) rand, NULL ); }