Hi,
this patch applies the 20091015 and 20091019 patches in
www/squidguard. For more information see:
http://squidguard.org/
Maybe we want them in before ports are locked?
Regards
i.
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/squidguard/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile 9 Apr 2009 23:53:13 -0000 1.6
+++ Makefile 3 Feb 2010 11:19:04 -0000
@@ -3,6 +3,7 @@
COMMENT = filter, redirector and access controller for Squid
DISTNAME = squidGuard-1.4
+PKGNAME = ${DISTNAME}p1
CATEGORIES = www
HOMEPAGE = http://www.squidguard.org/
Index: patches/patch-src_sgDiv_c_in
===================================================================
RCS file: patches/patch-src_sgDiv_c_in
diff -N patches/patch-src_sgDiv_c_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_sgDiv_c_in 3 Feb 2010 11:19:04 -0000
@@ -0,0 +1,11 @@
+--- src/sgDiv.c.in.orig Mon Jul 14 18:02:43 2008
++++ src/sgDiv.c.in Wed Feb 3 11:49:03 2010
+@@ -745,7 +745,7 @@
+ p++;
+ break;
+ case 'u': /* Requested URL */
+- strcat(buf, req->orig);
++ strncat(buf, req->orig, 2048);
+ p++;
+ break;
+ default:
Index: patches/patch-src_sgLog_c
===================================================================
RCS file: patches/patch-src_sgLog_c
diff -N patches/patch-src_sgLog_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_sgLog_c 3 Feb 2010 11:19:04 -0000
@@ -0,0 +1,44 @@
+--- src/sgLog.c.orig Fri Nov 16 17:58:32 2007
++++ src/sgLog.c Wed Feb 3 11:45:37 2010
+@@ -2,7 +2,7 @@
+ By accepting this notice, you agree to be bound by the following
+ agreements:
+
+- This software product, squidGuard, is copyrighted (C) 1998-2007
++ This software product, squidGuard, is copyrighted (C) 1998-2009
+ by Christine Kronberg, Shalla Secure Services. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify it
+@@ -55,8 +55,8 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
+- fprintf(stderr,"overflow in vsprintf (sgLog): %s",strerror(errno));
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
++ fprintf(stderr,"overflow in vsnprintf (sgLog): %s",strerror(errno));
+ va_end(ap);
+ date = niso(0);
+ if(globalDebug || log == NULL) {
+@@ -87,8 +87,8 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
+- sgLogFatalError("overflow in vsprintf (sgLogError): %s",strerror(errno));
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
++ sgLog(globalErrorLog, "overflow in vsnprintf (sgLogError):
%s",strerror(errno));
+ va_end(ap);
+ sgLog(globalErrorLog,"%s",msg);
+ }
+@@ -104,8 +104,8 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
+- return;
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
++ sgLog(globalErrorLog, "overflow in vsnprintf (sgLogError):
%s",strerror(errno));
+ va_end(ap);
+ sgLog(globalErrorLog,"%s",msg);
+ sgEmergency();
Index: patches/patch-src_sg_h_in
===================================================================
RCS file: patches/patch-src_sg_h_in
diff -N patches/patch-src_sg_h_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_sg_h_in 3 Feb 2010 11:19:04 -0000
@@ -0,0 +1,11 @@
+--- src/sg.h.in.orig Fri Nov 16 17:58:32 2007
++++ src/sg.h.in Wed Feb 3 11:48:53 2010
+@@ -73,7 +73,7 @@
+ #define REQUEST_TYPE_REDIRECT 2
+ #define REQUEST_TYPE_PASS 3
+
+-#define MAX_BUF 4096
++#define MAX_BUF 12288
+
+ #define DEFAULT_LOGFILE "squidGuard.log"
+ #define WARNING_LOGFILE "squidGuard.log"