diff -Nru squidguard-1.5/debian/changelog squidguard-1.5/debian/changelog --- squidguard-1.5/debian/changelog 2014-05-21 07:50:33.000000000 +0000 +++ squidguard-1.5/debian/changelog 2014-05-21 12:02:55.000000000 +0000 @@ -1,3 +1,9 @@ +squidguard (1.5-2unnet2~precise) precise; urgency=low + + * [PATCH] 99_add-pipeline-mode.patch (updated) + + -- Unilogic Networks Package Master Wed, 21 May 2014 14:02:54 +0200 + squidguard (1.5-2unnet1~precise) precise; urgency=low * [PATCH] 99_add-pipeline-mode.patch diff -Nru squidguard-1.5/debian/patches/99_add-pipeline-mode.patch squidguard-1.5/debian/patches/99_add-pipeline-mode.patch --- squidguard-1.5/debian/patches/99_add-pipeline-mode.patch 2014-05-21 07:50:07.000000000 +0000 +++ squidguard-1.5/debian/patches/99_add-pipeline-mode.patch 2014-05-21 12:10:55.000000000 +0000 @@ -1,6 +1,6 @@ diff -Nurpd sgorig/src/main.c sgpipe/src/main.c --- sgorig/src/main.c 2011-10-01 20:49:00.000000000 +0200 -+++ sgpipe/src/main.c 2014-05-21 09:46:59.663493344 +0200 ++++ sgpipe/src/main.c 2014-05-21 11:56:17.531954702 +0200 @@ -61,6 +61,7 @@ int globalDebugTimeDelta = 0; int globalDebug = 0; int globalPid = 0; @@ -176,8 +176,38 @@ diff -Nurpd sgorig/src/sgDiv.c sgpipe/src/sgDiv.c --- sgorig/src/sgDiv.c 2011-10-01 20:49:00.000000000 +0200 -+++ sgpipe/src/sgDiv.c 2014-05-21 09:42:16.815478302 +0200 -@@ -770,6 +770,7 @@ void sgEmergency () ++++ sgpipe/src/sgDiv.c 2014-05-21 14:09:38.048431022 +0200 +@@ -83,13 +83,14 @@ void sgAlarm(signal) + */ + + #if __STDC__ +-int parseLine(char *line, struct SquidInfo *s) ++int parseLine(char *buf, struct SquidInfo *s) + #else +-int parseLine(line, s) +- char *line; ++int parseLine(buf, s) ++ char *buf; + struct SquidInfo *s; + #endif + { ++ char line[MAX_BUF]; + char *p, *d = NULL, *a = NULL, *e = NULL, *o, *field; + int i = 0; + char c; +@@ -97,7 +98,10 @@ int parseLine(line, s) + int trailingdot = 0; + size_t strsz; + int ndx = 0; +- ++ ++ /* don't mangle the original input buffer */ ++ strncpy(line, buf, MAX_BUF); ++ + field = strtok(line,"\t "); + /*field holds each fetched url*/ + /* Let's first decode the url and then test it. Fixes bug2. */ +@@ -770,6 +774,7 @@ void sgEmergency () { char buf[MAX_BUF]; extern char *globalCreateDb; @@ -185,7 +215,7 @@ extern int passthrough; /* from main.c */ if (globalCreateDb == NULL) { if (passthrough == 1) { -@@ -782,7 +783,10 @@ void sgEmergency () +@@ -782,7 +787,10 @@ void sgEmergency () } sgLogError("ERROR: Going into emergency mode"); while(fgets(buf, MAX_BUF, stdin) != NULL){ @@ -199,8 +229,38 @@ sgLogError("ERROR: Ending emergency mode, stdin empty"); diff -Nurpd sgorig/src/sgDiv.c.in sgpipe/src/sgDiv.c.in --- sgorig/src/sgDiv.c.in 2011-10-01 20:49:00.000000000 +0200 -+++ sgpipe/src/sgDiv.c.in 2014-05-21 09:42:16.815478302 +0200 -@@ -770,6 +770,7 @@ void sgEmergency () ++++ sgpipe/src/sgDiv.c.in 2014-05-21 14:09:51.752430921 +0200 +@@ -83,13 +83,14 @@ void sgAlarm(signal) + */ + + #if __STDC__ +-int parseLine(char *line, struct SquidInfo *s) ++int parseLine(char *buf, struct SquidInfo *s) + #else +-int parseLine(line, s) +- char *line; ++int parseLine(buf, s) ++ char *buf; + struct SquidInfo *s; + #endif + { ++ char line[MAX_BUF]; + char *p, *d = NULL, *a = NULL, *e = NULL, *o, *field; + int i = 0; + char c; +@@ -97,7 +98,10 @@ int parseLine(line, s) + int trailingdot = 0; + size_t strsz; + int ndx = 0; +- ++ ++ /* don't mangle the original input buffer */ ++ strncpy(line, buf, MAX_BUF); ++ + field = strtok(line,"\t "); + /*field holds each fetched url*/ + /* Let's first decode the url and then test it. Fixes bug2. */ +@@ -770,6 +774,7 @@ void sgEmergency () { char buf[MAX_BUF]; extern char *globalCreateDb; @@ -208,7 +268,7 @@ extern int passthrough; /* from main.c */ if (globalCreateDb == NULL) { if (passthrough == 1) { -@@ -782,7 +783,10 @@ void sgEmergency () +@@ -782,7 +787,10 @@ void sgEmergency () } sgLogError("ERROR: Going into emergency mode"); while(fgets(buf, MAX_BUF, stdin) != NULL){