aboutsummaryrefslogtreecommitdiffstats
path: root/www/sarg
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2007-06-11 19:25:32 +0800
committergarga <garga@FreeBSD.org>2007-06-11 19:25:32 +0800
commit6406ee72c65fce632b33fec0fc105856a8956d69 (patch)
tree193dcf26f8bbd61b5ed6203ca4261b707880bf63 /www/sarg
parentee814d6cbb1c9294383f7c9910bee4ca58468870 (diff)
downloadfreebsd-ports-gnome-6406ee72c65fce632b33fec0fc105856a8956d69.tar.gz
freebsd-ports-gnome-6406ee72c65fce632b33fec0fc105856a8956d69.tar.zst
freebsd-ports-gnome-6406ee72c65fce632b33fec0fc105856a8956d69.zip
- Fix a segmentation fault when you are using authentication and have a user
named "log" - Bump PORTREVISION Obtained from: Sarg bugtracker
Diffstat (limited to 'www/sarg')
-rw-r--r--www/sarg/Makefile2
-rw-r--r--www/sarg/files/patch-report.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/www/sarg/Makefile b/www/sarg/Makefile
index 2bc2e8e255cf..2f0ec6ea53b9 100644
--- a/www/sarg/Makefile
+++ b/www/sarg/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sarg
PORTVERSION= 2.2.3.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= www
MASTER_SITES= SF
diff --git a/www/sarg/files/patch-report.c b/www/sarg/files/patch-report.c
new file mode 100644
index 000000000000..c0f29234e497
--- /dev/null
+++ b/www/sarg/files/patch-report.c
@@ -0,0 +1,30 @@
+--- report.c.orig Tue Jan 2 17:11:26 2007
++++ report.c Fri Jun 8 08:13:13 2007
+@@ -46,6 +46,7 @@
+ long long int incache=0;
+ long long int oucache=0;
+ char *s;
++ char *haystack;
+ DIR *dirp;
+ struct dirent *direntp;
+
+@@ -73,7 +74,9 @@
+
+ dirp = opendir(tmp);
+ while ((direntp = readdir( dirp )) != NULL ) {
+- if((strstr(direntp->d_name,".log") == 0) ||
++ haystack=direntp->d_name;
++ haystack+=(strlen(haystack)-5);
++ if((strstr(haystack,".log") == 0) ||
+ (strncmp(direntp->d_name,"download.log",12) == 0) ||
+ (strncmp(direntp->d_name,"denied.log",10) == 0) ||
+ (strncmp(direntp->d_name,"authfail.log.unsort",19) == 0))
+@@ -89,7 +92,7 @@
+ getword(wname2,wdname,'.');
+ strcat(user,wname2);
+
+- if(strcmp(wdname,"log") !=0) {
++ if((strcmp(wdname,"log")!=0) || (strlen(wdname)>3)) {
+ strcat(user,".");
+ goto strip_prefix;
+ }