From: Frédéric Marchal Date: Sat, 18 Sep 2010 12:38:00 +0000 (+0000) Subject: Initialize the variables that are used to build the date range when command line... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb78ef39cba6d88d2aec6d19a3087ff856f3ea2a;p=thirdparty%2Fsarg.git Initialize the variables that are used to build the date range when command line option -d is used. It should prevent a segfault if the complex nesting of "if" fails to set a variable. Thanks to ItalianPenguin for reporting this bug. --- diff --git a/ChangeLog b/ChangeLog index c119ac6..a41db39 100644 --- 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 de65878..9cb4f31 100644 --- 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;