1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-11 06:34:40 +02:00

ls: avoid just-introduced buffer overrun

* src/ls.c (gobble_file): Revert part of my preceding change,
to avoid clobbering stack.
This commit is contained in:
Jim Meyering
2010-06-10 17:49:30 +02:00
parent 9e7edd8467
commit ea615bf8cd

View File

@@ -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;