[ADVAPI32]

- Do not use the upper byte of RtlRandom's result in RtlGenRandom, since the function only generates 31 bits. Should fix UuidCreate test in rpcrt4:rpc.

svn path=/trunk/; revision=63633
This commit is contained in:
Thomas Faber 2014-06-23 15:21:13 +00:00
parent 1fd39b3a08
commit 9e0c44c18d

View file

@ -607,9 +607,9 @@ SystemFunction036(PVOID pbBuffer, ULONG dwLen)
do do
{ {
/* Get each byte from the pseudo random number and store it in the buffer */ /* Get each byte from the pseudo random number and store it in the buffer */
*pBuffer = (BYTE)(uPseudoRandom >> 8 * (dwLen % 4) & 0xFF); *pBuffer = (BYTE)(uPseudoRandom >> 8 * (dwLen % 3) & 0xFF);
++pBuffer; ++pBuffer;
} while(--dwLen % 4); } while(--dwLen % 3);
} while(dwLen); } while(dwLen);
return TRUE; return TRUE;