From fc809973b9be1104af806f9c35e66d1be3dfab35 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 4 Nov 2003 20:09:44 +0000 Subject: Use the actual size of the buffer in strftime instead of a made up value which just happens to be less than sizeof(fstring). Closes #713. (This used to be commit 761e13da4ef8294f0b131ad7f672d023b0d222f6) --- source3/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/time.c b/source3/lib/time.c index 74ca56bdc5..635ede9be2 100644 --- a/source3/lib/time.c +++ b/source3/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) { -- cgit