From ea615bf8cdc59c73288577fb135d6f2ead500ebe Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 10 Jun 2010 17:49:30 +0200 Subject: [PATCH] ls: avoid just-introduced buffer overrun * src/ls.c (gobble_file): Revert part of my preceding change, to avoid clobbering stack. --- src/ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ls.c b/src/ls.c index 4e0a036c8b..668507e0c6 100644 --- a/src/ls.c +++ b/src/ls.c @@ -2986,7 +2986,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, if (format == long_format) { - char b[INT_BUFSIZE_BOUND (f->stat.st_nlink)]; + char b[INT_BUFSIZE_BOUND (uintmax_t)]; int b_len = strlen (umaxtostr (f->stat.st_nlink, b)); if (nlink_width < b_len) nlink_width = b_len; -- 2.47.3