diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-29 16:18:06 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-30 15:25:15 -0300 |
commit | 609c9d0951da387cd523b5db42a82d38dabc37c4 (patch) | |
tree | a9f4e664f78c4d4870d479db5ef467519d015137 /stdlib | |
parent | 13db9ee2cb3b77e25f852be7d6952882e1be6f00 (diff) | |
download | glibc-609c9d0951da387cd523b5db42a82d38dabc37c4.zip glibc-609c9d0951da387cd523b5db42a82d38dabc37c4.tar.gz glibc-609c9d0951da387cd523b5db42a82d38dabc37c4.tar.bz2 |
malloc: Do not clobber errno on __getrandom_nocancel (BZ #29624)
Use INTERNAL_SYSCALL_CALL instead of INLINE_SYSCALL_CALL. This
requires emulate the semantic for hurd call (so __arc4random_buf
uses the fallback).
Checked on x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/arc4random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/arc4random.c b/stdlib/arc4random.c index 960a38f..c126c60 100644 --- 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 (); } |