Commit eba704b8 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo Committed by Alexandre Julliard

ntdll: Win64 fix for get_pointer_obfuscator.

parent 0ef69ef9
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment