summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-06-10 17:49:30 +0200
committerJim Meyering <meyering@redhat.com>2010-06-10 17:53:46 +0200
commitea615bf8cdc59c73288577fb135d6f2ead500ebe (patch)
treef27fe8f7b45a76e007099ab688c879dfdf7164d1
parent9e7edd8467232b5c6b714d588d0e1528cc54151b (diff)
downloadcoreutils-ea615bf8cdc59c73288577fb135d6f2ead500ebe.tar.gz
ls: avoid just-introduced buffer overrun
* src/ls.c (gobble_file): Revert part of my preceding change, to avoid clobbering stack.
-rw-r--r--src/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 4e0a036c8..668507e0c 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;