projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e7edd8
)
ls: avoid just-introduced buffer overrun
author
Jim Meyering
<meyering@redhat.com>
Thu, 10 Jun 2010 15:49:30 +0000
(17:49 +0200)
committer
Jim Meyering
<meyering@redhat.com>
Thu, 10 Jun 2010 15:53:46 +0000
(17:53 +0200)
* src/ls.c (gobble_file): Revert part of my preceding change,
to avoid clobbering stack.
src/ls.c
patch
|
blob
|
history
diff --git
a/src/ls.c
b/src/ls.c
index
4e0a036
..
668507e
100644
(file)
--- 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;