]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Initialize the variables that are used to build the date range when command line...
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:38:00 +0000 (12:38 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:38:00 +0000 (12:38 +0000)
ChangeLog
util.c

index c119ac68a6b51b2c90a4469117ac21e5275cd45b..a41db3971be94f13edb2157d58d2f4c3c1bccd37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 SARG ChangeLog
 
-Aug-17-2010 Version 2.3.1
+Aug-27-2010 Version 2.3.1
                - Remove the distinct printf for the alpha architecture as it doesn't work anymore and is not necessary anyway.
                - Don't abort if "onload" or "script" is found in the user agent string.
                - Take the configured locale path into account when installing sarg.
@@ -12,6 +12,7 @@ Aug-17-2010 Version 2.3.1
                - Fix a problem with the progress indicator when reading from a compressed log file.
                - Report an error if the output directory is a subdirectory of the temporary directory.
                - Use a more robust protection against an attack using javascript in the useragent string.
+               - Prevent a segfault if the parameter passed to command line option -d is invalid (thanks to ItalianPenguin).
 
 Jun-21-2010 Version 2.3
                - LDAP usertab added. 
diff --git a/util.c b/util.c
index de65878b7dc8f08904cbef2180b85bd12c6c02e1..9cb4f31db16889830d59f6b8920179dcdb8083ba 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1146,12 +1146,12 @@ char *fixtime(long long int elap)
 
 void date_from(char *date, int *dfrom, int *duntil)
 {
-   int d0;
-   int m0;
-   int y0;
-   int d1;
-   int m1;
-   int y1;
+   int d0=0;
+   int m0=0;
+   int y0=0;
+   int d1=0;
+   int m1=0;
+   int y1=0;
 
    if (isdigit(date[0])) {
       int next=-1;