From 13db9ee2cb3b77e25f852be7d6952882e1be6f00 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 29 Sep 2022 16:15:20 -0300 Subject: 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 --- stdlib/arc4random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/arc4random.c b/stdlib/arc4random.c index e417ef624d..960a38f295 100644 --- a/stdlib/arc4random.c +++ b/stdlib/arc4random.c @@ -34,7 +34,7 @@ void __arc4random_buf (void *p, size_t n) { static int seen_initialized; - size_t l; + ssize_t l; int fd; if (n == 0) -- cgit 1.4.1