diff options
Diffstat (limited to 'Src/Modules/stat.c')
| -rw-r--r-- | Src/Modules/stat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c index 5bf201dd3..f7ec06e9e 100644 --- a/Src/Modules/stat.c +++ b/Src/Modules/stat.c @@ -191,14 +191,14 @@ static void stattimeprint(time_t tim, long nsecs, char *outbuf, int flags) { if (flags & STF_RAW) { - sprintf(outbuf, "%ld", (unsigned long)tim); + sprintf(outbuf, "%ld", (long)tim); if (flags & STF_STRING) strcat(outbuf, " ("); } if (flags & STF_STRING) { char *oend = outbuf + strlen(outbuf); - /* Where the heck does "40" come from? */ - ztrftime(oend, 40, timefmt, (flags & STF_GMT) ? gmtime(&tim) : + /* the buffer is PATH_MAX+9 long, but we already printed some stuff */ + ztrftime(oend, PATH_MAX - DIGBUFSIZE - 10, timefmt, (flags & STF_GMT) ? gmtime(&tim) : localtime(&tim), nsecs); if (flags & STF_RAW) strcat(oend, ")"); |
