[PATCH 1/2] stdlib: Fix __getrandom_nocancel type and arc4random usage (BZ #29638)
Andreas Schwab
schwab@linux-m68k.org
Thu Sep 29 20:01:15 GMT 2022
On Sep 29 2022, H.J. Lu via Libc-alpha wrote:
>> 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
>
> Shouldn't it be __syscall_slong_t?
getrandom can never return more than the size of the buffer.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
More information about the Libc-alpha
mailing list