mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
stdlib: Fix tst-getrandom memcmp call
The idea is to check if the up sizeof (buf) are equal, not only the first byte. Checked on x86_64-linux-gnu and i686-linux-gnu.
This commit is contained in:
parent
3ff447f7df
commit
7f2ddf7400
@ -189,7 +189,7 @@ test_getentropy (void)
|
|||||||
|
|
||||||
/* The probability that these two buffers are equal is very
|
/* The probability that these two buffers are equal is very
|
||||||
small. */
|
small. */
|
||||||
if (memcmp (buf, buf2, sizeof (buf) == 0))
|
if (memcmp (buf, buf2, sizeof (buf)) == 0)
|
||||||
{
|
{
|
||||||
printf ("error: getentropy appears to return constant bytes\n");
|
printf ("error: getentropy appears to return constant bytes\n");
|
||||||
errors = true;
|
errors = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user