mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03: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:
1 parent
9e7edd8467
commit
ea615bf8cd
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user