From: Frédéric Marchal Date: Wed, 2 Feb 2011 14:00:51 +0000 (+0000) Subject: Accept IPv6 addresses in squidGuard's log X-Git-Tag: v2.3.2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad4353be489f9456584e1a909d8788ea43e38bc8;p=thirdparty%2Fsarg.git Accept IPv6 addresses in squidGuard's log The buffer to store a IP address from squidGuard's log was not big enough to hold an IPv6 address. That resulted in a getword loop error. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 756181d..d84c307 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(sarg C) SET(sarg_VERSION 2) SET(sarg_REVISION "3.2-pre1") SET(sarg_BUILD "") -SET(sarg_BUILDDATE "Jan-27-2011") +SET(sarg_BUILDDATE "Feb-02-2011") INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFile) diff --git a/include/info.h b/include/info.h index 2d4d8b5..2f77f54 100755 --- a/include/info.h +++ b/include/info.h @@ -1,3 +1,3 @@ -#define VERSION PACKAGE_VERSION" Jan-27-2011" +#define VERSION PACKAGE_VERSION" Feb-02-2011" #define PGM PACKAGE_NAME #define URL "http://sarg.sourceforge.net" diff --git a/squidguard_log.c b/squidguard_log.c index 1ed4035..16406b9 100644 --- a/squidguard_log.c +++ b/squidguard_log.c @@ -40,7 +40,7 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil) char source[128], list[128]; char url[MAX_URL_LEN]; char user[MAX_USER_LEN]; - char ip[25]; + char ip[45]; long long int lmon, lday, lyear; int mon, day, year; int idata=0; diff --git a/squidguard_report.c b/squidguard_report.c index cded053..111cd70 100644 --- a/squidguard_report.c +++ b/squidguard_report.c @@ -35,9 +35,9 @@ void squidguard_report(void) char *url; char squidguard_in[MAXLEN]; char report[MAXLEN]; - char ip[MAXLEN]; + char ip[45]; char rule[255]; - char oip[MAXLEN]; + char oip[45]; char user[MAXLEN]; char ouser[MAXLEN]; char data[15];