summaryrefslogtreecommitdiffstats
path: root/source/lib/time.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-26 18:55:29 +0000
committerJeremy Allison <jra@samba.org>1997-09-26 18:55:29 +0000
commite7eb1f044d3101679dc7a118820ea5efe0cd837c (patch)
tree08728855970cb96ca587b1bf241304f579d85c22 /source/lib/time.c
parent2c5587a6fe425b1cc57cf28e92e77ba84f08ce33 (diff)
downloadsamba-e7eb1f044d3101679dc7a118820ea5efe0cd837c.tar.gz
samba-e7eb1f044d3101679dc7a118820ea5efe0cd837c.tar.xz
samba-e7eb1f044d3101679dc7a118820ea5efe0cd837c.zip
Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)
Diffstat (limited to 'source/lib/time.c')
-rw-r--r--source/lib/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/time.c b/source/lib/time.c
index d16552b61e2..4f688d2214a 100644
--- a/source/lib/time.c
+++ b/source/lib/time.c
@@ -469,12 +469,12 @@ BOOL set_filetime(char *fname,time_t mtime)
****************************************************************************/
char *timestring(void )
{
- static char TimeBuf[100];
+ static fstring TimeBuf;
time_t t = time(NULL);
struct tm *tm = LocalTime(&t);
#ifdef NO_STRFTIME
- strcpy(TimeBuf, asctime(tm));
+ fstrcpy(TimeBuf, asctime(tm));
#elif defined(CLIX) || defined(CONVEX)
strftime(TimeBuf,100,"%m/%d/%y %I:%M:%S %p",tm);
#elif defined(AMPM)