mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
dumpscan: appease gcc8 -Wformat-overflow
gcc does not benefit from our external knowledge that tm_year is tightly bounded, and thinks it could still be in the range [-2147481748, 2147483647], which would overflow our string buffer. The function in question does not have error handling in place, so rather than adding some or trying to assert the proper bounds, just use a slightly larger buffer for safety. Change-Id: Iafcba5588b805347ddcc0102969bd0e2a3173dd0 Reviewed-on: https://gerrit.openafs.org/13472 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
dff81f1b78
commit
8f03ff3bdd
@ -237,7 +237,7 @@ static char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
static char *
|
||||
datestr(time_t date)
|
||||
{
|
||||
static char str[13];
|
||||
static char str[20];
|
||||
time_t clock = time(0);
|
||||
struct tm *now, *then;
|
||||
int diff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user