diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-29 16:15:20 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-30 15:32:51 -0300 |
commit | 76e05613ee28f4ac4a0ab97effc32e0e78e37a56 (patch) | |
tree | 895191427008f11cb5ded8584fdcf5e195ef3e3d /sysdeps/unix/sysv/linux | |
parent | 227c9035872fc9e9e2cf56ec8f89219747ee19bc (diff) | |
download | glibc-76e05613ee28f4ac4a0ab97effc32e0e78e37a56.tar glibc-76e05613ee28f4ac4a0ab97effc32e0e78e37a56.tar.gz glibc-76e05613ee28f4ac4a0ab97effc32e0e78e37a56.tar.bz2 glibc-76e05613ee28f4ac4a0ab97effc32e0e78e37a56.zip |
stdlib: Fix __getrandom_nocancel type and arc4random usage (BZ #29638)
Using an unsigned type prevents the fallback to be used if kernel
does not support getrandom syscall.
Checked on x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
(cherry picked from commit 13db9ee2cb3b77e25f852be7d6952882e1be6f00)
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/not-cancel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index a263d294b1..cf35c8bfc9 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -68,7 +68,7 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt) INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt); } -static inline int +static inline ssize_t __getrandom_nocancel (void *buf, size_t buflen, unsigned int flags) { return INLINE_SYSCALL_CALL (getrandom, buf, buflen, flags); |