From 06e3cc62905871ef418878c465c1190ee3c97733 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Sat, 1 Aug 2009 21:07:51 +0000 Subject: [PATCH] Fixed bug #2000178. --- squidguard_log.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/squidguard_log.c b/squidguard_log.c index 79bc943..38153b4 100644 --- a/squidguard_log.c +++ b/squidguard_log.c @@ -40,6 +40,7 @@ static void read_log(const char *wentp, FILE *fp_ou) char wdata[127]; int idata=0; int i; + char *str; if(debug) { strcpy(buf,text[7]); @@ -70,7 +71,7 @@ static void read_log(const char *wentp, FILE *fp_ou) */ for (i=0; i 0) { strcpy(bufbsf,SquidGuardLogFormat); @@ -131,12 +132,14 @@ static void read_log(const char *wentp, FILE *fp_ou) getword(day,sizeof(day),buf,' ')<0 || getword(hour,sizeof(hour),buf,' ')<0 || getword(list,sizeof(list),buf,'/')<0 || getword(list,sizeof(list),buf,'/')<0 || getword(tmp5,sizeof(tmp5),buf,'/')<0 || getword(tmp5,sizeof(tmp5),buf,'/')<0 || - getword(url,sizeof(url),buf,'/')<0 || getword(tmp5,sizeof(tmp5),buf,' ')<0 || + getword(url,sizeof(url),buf,' ')<0 || getword(ip,sizeof(ip),buf,'/')<0 || getword(user,sizeof(user),buf,' ')<0 || getword(user,sizeof(user),buf,' ')<0) { printf("SARG: Maybe you have a broken record or garbage in your %s file.\n",wentp); exit(1); } + str=strchr(url,'/'); + if (str) *str='\0'; } sprintf(warea,"%s%s%s",year,mon,day); -- 2.47.3