projects
/
platform
/
upstream
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
malloc: Do not clobber errno on __getrandom_nocancel (BZ #29624)
[platform/upstream/glibc.git]
/
stdlib
/
arc4random.c
diff --git
a/stdlib/arc4random.c
b/stdlib/arc4random.c
index
960a38f
..
c126c60
100644
(file)
--- a/
stdlib/arc4random.c
+++ b/
stdlib/arc4random.c
@@
-51,7
+51,7
@@
__arc4random_buf (void *p, size_t n)
n -= l;
continue; /* Interrupted by a signal; keep going. */
}
- else if (l
< 0 && errno ==
ENOSYS)
+ else if (l
== -
ENOSYS)
break; /* No syscall, so fallback to /dev/urandom. */
arc4random_getrandom_failure ();
}