diff options
author | Jim Meyering <jim@meyering.net> | 1997-01-28 03:40:18 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-01-28 03:40:18 +0000 |
commit | 771ab6e1bf8da0bade29ec79c06f1ca8b1263ed7 (patch) | |
tree | e55480b12b96b3a786a277ce38faa7074f25dfe7 /src | |
parent | b103723acca33ed0add1abfa56ee8b9f3f4ad438 (diff) | |
download | coreutils-771ab6e1bf8da0bade29ec79c06f1ca8b1263ed7.tar.xz |
(print_long_format): Fix off-by-one problem in size being passed to strftime.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2139,7 +2139,7 @@ print_long_format (const struct fileinfo *f) /* Use strftime rather than ctime, because the former can produce locale-dependent names for the weekday (%a) and month (%b). */ - while (! (s = strftime (p, buf + bufsize - p, fmt, localtime (&when)))) + while (! (s = strftime (p, buf + bufsize - p - 1, fmt, localtime (&when)))) { char *newbuf = (char *) alloca (bufsize *= 2); memcpy (newbuf, buf, p - buf); |