summaryrefslogtreecommitdiff
path: root/gnu/libexec
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2003-05-17 15:05:19 +0000
committeritojun <itojun@NetBSD.org>2003-05-17 15:05:19 +0000
commit0ba5684be4da297250948e9aa7da2871c64604b1 (patch)
treea59f8aae52746c61492debdd18f1b85cf25513b6 /gnu/libexec
parent7b631c16fa144ceaed25bf81c5abc5741d6ede04 (diff)
possible scanf overrun
Diffstat (limited to 'gnu/libexec')
-rw-r--r--gnu/libexec/uucp/contrib/uurate.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/libexec/uucp/contrib/uurate.c b/gnu/libexec/uucp/contrib/uurate.c
index d4149f39c88..6d45891d8c5 100644
--- a/gnu/libexec/uucp/contrib/uurate.c
+++ b/gnu/libexec/uucp/contrib/uurate.c
@@ -84,6 +84,9 @@
* get knowledge of
*/
/* $Log: uurate.c,v $
+/* Revision 1.4 2003/05/17 15:05:19 itojun
+/* possible scanf overrun
+/*
/* Revision 1.3 1995/08/24 05:19:21 jtc
/* Upgraded to Taylor UUCP 1.06.1 (Thanks to John Kohl).
/*
@@ -142,7 +145,7 @@
* */
char version[] = "@(#) Taylor UUCP Log File Summary Filter, Version 1.2.2";
-static char rcsid[] = "$Id: uurate.c,v 1.3 1995/08/24 05:19:21 jtc Exp $";
+static char rcsid[] = "$Id: uurate.c,v 1.4 2003/05/17 15:05:19 itojun Exp $";
#include <ctype.h> /* Character Classification */
#include <math.h>
#include "uucp.h"
@@ -552,7 +555,7 @@ int main(argc, argv)
{
#if HAVE_TAYLOR_LOGGING
- sscanf(++stt,"%s%*c%[^.]",in_date,in_time);
+ sscanf(++stt,"%13s%*c%[^.]",in_date,in_time);
#endif /* HAVE_TAYLOR_LOGGING */
#if HAVE_V2_LOGGING
@@ -830,7 +833,7 @@ int main(argc, argv)
{
#if HAVE_TAYLOR_LOGGING
- sscanf(dt_info,"%s%*c%[^.]",in_date,in_time);
+ sscanf(dt_info,"%13s%*c%[^.]",in_date,in_time);
#endif /* HAVE_TAYLOR_LOGGING */
#if HAVE_V2_LOGGING
@@ -1659,7 +1662,8 @@ int chk_config(char *T_conf,int be_quiet, int type)
{
if (logline[0] == '#')
continue;
- sscanf(logline,"%8s %s",keywrd,name);
+ /* XXX sizeof(name) == 1024 */
+ sscanf(logline,"%8s %1023s",keywrd,name);
if (0 == strncmp(keywrd,"logfile",7))
{
pos1 = pos2 = name;