diff --git a/source/lib/time.c b/source/lib/time.c index 74ca56bdc5c..635ede9be22 100644 --- a/source/lib/time.c +++ b/source/lib/time.c @@ -694,7 +694,7 @@ char *timestring(BOOL hires) ".%06ld", (long)tp.tv_usec); } else { - strftime(TimeBuf,100,"%Y/%m/%d %H:%M:%S",tm); + strftime(TimeBuf,sizeof(TimeBuf)-1,"%Y/%m/%d %H:%M:%S",tm); } #else if (hires) {