From b216846e8f489e1934b457ebd2bfb1a5b4ae62e4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 5 Nov 2003 17:28:18 +0000 Subject: Merge from 3.0: Revision 1.42.2.8: 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 45c28f8a2723b5e942d13d1c6e5db757921fb64f) --- source3/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') 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