]> 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>
Fri, 27 Aug 2010 13:16:43 +0000 (13:16 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Fri, 27 Aug 2010 13:16:43 +0000 (13:16 +0000)
It should prevent a segfault if the complex nesting of "if" fails to set a variable.
Thanks to ItalianPenguin for reporting this bug.

CMakeLists.txt
ChangeLog
include/info.h
util.c

index 893c78eee68f1067337692839e9c0106aa23da89..14c2970bc98297c558a88b6161095200491a8420 100755 (executable)
@@ -3,7 +3,7 @@ PROJECT(sarg C)
 SET(sarg_VERSION 2)
 SET(sarg_REVISION "3.1-pre1")
 SET(sarg_BUILD "")
-SET(sarg_BUILDDATE "Aug-25-2010")
+SET(sarg_BUILDDATE "Aug-27-2010")
 
 INCLUDE(AddFileDependencies)
 INCLUDE(CheckIncludeFile)
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. 
index c76d936670805887a2c106f29bd23d354425d550..70dfd87cda5b4f6eec1c96c1efa94cc467f9ef1c 100755 (executable)
@@ -1,3 +1,3 @@
-#define VERSION PACKAGE_VERSION" Aug-25-2010"
+#define VERSION PACKAGE_VERSION" Aug-27-2010"
 #define PGM PACKAGE_NAME
 #define URL "http://sarg.sourceforge.net"
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;