aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog5
-rw-r--r--util/miscutil.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index 5ce18b66f..4b568949c 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 23 10:07:57 CET 2000 Werner Koch <[email protected]>
+
+ * miscutil.c (asctimestamp): Fix for possible buffer overflow by
+ large system returned date format string.
+
Fri Dec 31 14:08:15 CET 1999 Werner Koch <[email protected]>
* logger.c (log_inc_errorcount): New.
diff --git a/util/miscutil.c b/util/miscutil.c
index eb72415bb..0b87f1b84 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -147,7 +147,7 @@ asctimestamp( u32 stamp )
tp = localtime( &atime );
#ifdef HAVE_STRFTIME
#if defined(HAVE_NL_LANGINFO)
- mem2str( fmt, nl_langinfo(D_T_FMT), DIM(fmt) );
+ mem2str( fmt, nl_langinfo(D_T_FMT), DIM(fmt)-3 );
if( strstr( fmt, "%Z" ) == NULL )
strcat( fmt, " %Z");
strftime( buffer, DIM(buffer)-1, fmt, tp );