logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: d0ea89a5b18bf63f4a3dbf1516d1605137399559
parent 39fd1311b979bded6ce17f5d4fc712420a9f80d2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 25 Jun 2025 02:47:13 +0200

cmd/shuf: make sure alloc of size 0 doesn't happens

Diffstat:

Mcmd/shuf.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/shuf.c b/cmd/shuf.c @@ -48,7 +48,7 @@ shuf(FILE *in, const char *fname) return 1; } - if(nread < 0) return 0; + if(nread <= 0) return 0; errno = 0; char *dup = malloc(nread);