Fix a stack overflow problem with an empty config file.

PR:		11834
Submitted by:	maintainer
This commit is contained in:
Steve Price 1999-05-29 04:31:33 +00:00
parent a221ee94d0
commit 43e5ccb576
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=19071
6 changed files with 44 additions and 4 deletions

View File

@ -3,14 +3,14 @@
# Date created: 28 Jul 1996
# Whom: shanee@augusta.de
#
# $Id: Makefile,v 1.3 1998/02/06 19:07:05 fenner Exp $
# $Id: Makefile,v 1.4 1998/10/04 22:41:22 steve Exp $
#
DISTNAME= logsurfer-1.41
CATEGORIES= misc
MASTER_SITES= ftp://ftp.fh-rosenheim.de/pub/mirror/cert.dfn/tools/audit/logsurfer/ \
ftp://ftp.tuwien.ac.at/infosys/security/dfn/tools/audit/logsurfer/ \
ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cert.dfn.de/tools/audit/logsurfer/ \
ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cert.dfn.de/tools/audit/logsurfer/
MAINTAINER= shanee@augusta.de

View File

@ -0,0 +1,10 @@
--- src/logsurfer.c.orig Mon Apr 8 10:15:53 1996
+++ src/logsurfer.c Fri May 28 14:28:06 1999
@@ -382,6 +382,7 @@
(void) fprintf(stderr, "unable to allocate memory for logline_buffer\n");
exit(99);
}
+ logline_buffer[0]='\0';
while ( (opt = getopt(argc, argv, "fc:d:l:p:r:s")) != EOF )
switch(opt) {

View File

@ -0,0 +1,10 @@
--- src/readcf.c.orig Fri Feb 16 07:45:31 1996
+++ src/readcf.c Fri May 28 14:28:07 1999
@@ -112,6 +112,7 @@
(void) fprintf(stderr, "memory problems reading configfile\n");
return(1);
}
+ buffer[0]='\0';
/* dito for one complete configline */
cfline_size=1024;
if ( (cfline=(char *)malloc(cfline_size)) == NULL ) {

View File

@ -3,14 +3,14 @@
# Date created: 28 Jul 1996
# Whom: shanee@augusta.de
#
# $Id: Makefile,v 1.3 1998/02/06 19:07:05 fenner Exp $
# $Id: Makefile,v 1.4 1998/10/04 22:41:22 steve Exp $
#
DISTNAME= logsurfer-1.41
CATEGORIES= misc
MASTER_SITES= ftp://ftp.fh-rosenheim.de/pub/mirror/cert.dfn/tools/audit/logsurfer/ \
ftp://ftp.tuwien.ac.at/infosys/security/dfn/tools/audit/logsurfer/ \
ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cert.dfn.de/tools/audit/logsurfer/ \
ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cert.dfn.de/tools/audit/logsurfer/
MAINTAINER= shanee@augusta.de

View File

@ -0,0 +1,10 @@
--- src/logsurfer.c.orig Mon Apr 8 10:15:53 1996
+++ src/logsurfer.c Fri May 28 14:28:06 1999
@@ -382,6 +382,7 @@
(void) fprintf(stderr, "unable to allocate memory for logline_buffer\n");
exit(99);
}
+ logline_buffer[0]='\0';
while ( (opt = getopt(argc, argv, "fc:d:l:p:r:s")) != EOF )
switch(opt) {

View File

@ -0,0 +1,10 @@
--- src/readcf.c.orig Fri Feb 16 07:45:31 1996
+++ src/readcf.c Fri May 28 14:28:07 1999
@@ -112,6 +112,7 @@
(void) fprintf(stderr, "memory problems reading configfile\n");
return(1);
}
+ buffer[0]='\0';
/* dito for one complete configline */
cfline_size=1024;
if ( (cfline=(char *)malloc(cfline_size)) == NULL ) {