mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[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:
parent
1fd39b3a08
commit
9e0c44c18d
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue