From: Jim Meyering Date: Thu, 10 Jun 2010 15:49:30 +0000 (+0200) Subject: ls: avoid just-introduced buffer overrun X-Git-Tag: v8.6~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea615bf8cdc59c73288577fb135d6f2ead500ebe;p=thirdparty%2Fcoreutils.git ls: avoid just-introduced buffer overrun * src/ls.c (gobble_file): Revert part of my preceding change, to avoid clobbering stack. --- 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;