summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-04 20:09:44 +0000
committerTim Potter <tpot@samba.org>2003-11-04 20:09:44 +0000
commitfc809973b9be1104af806f9c35e66d1be3dfab35 (patch)
tree8f3f41a012341aac74ccc14852012b44cd16335d /source3/lib
parentcedc6341183fe6f0a64fc694e4475efa6c2c528e (diff)
downloadsamba-fc809973b9be1104af806f9c35e66d1be3dfab35.tar.gz
samba-fc809973b9be1104af806f9c35e66d1be3dfab35.tar.bz2
samba-fc809973b9be1104af806f9c35e66d1be3dfab35.zip
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)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c2
1 files changed, 1 insertions, 1 deletions
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) {