pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/webalizer
Module Name: pkgsrc
Committed By: bsiegert
Date: Sat Feb 20 14:37:24 UTC 2021
Modified Files:
pkgsrc/www/webalizer: Makefile distinfo
Added Files:
pkgsrc/www/webalizer/patches: patch-preserve.c
Log Message:
webalizer: fix crashes
Use memmove instead of memcpy with overlapping arguments. Patch from
Adrian Immanuel Kiess in PR pkg/55809.
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 pkgsrc/www/webalizer/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/www/webalizer/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/webalizer/patches/patch-preserve.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/webalizer/Makefile
diff -u pkgsrc/www/webalizer/Makefile:1.72 pkgsrc/www/webalizer/Makefile:1.73
--- pkgsrc/www/webalizer/Makefile:1.72 Thu Nov 26 16:08:13 2020
+++ pkgsrc/www/webalizer/Makefile Sat Feb 20 14:37:23 2021
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.72 2020/11/26 16:08:13 bsiegert Exp $
+# $NetBSD: Makefile,v 1.73 2021/02/20 14:37:23 bsiegert Exp $
DISTNAME= webalizer-2.23-08-src
PKGNAME= webalizer-2.23.8
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/
EXTRACT_SUFX= .tar.bz2
Index: pkgsrc/www/webalizer/distinfo
diff -u pkgsrc/www/webalizer/distinfo:1.17 pkgsrc/www/webalizer/distinfo:1.18
--- pkgsrc/www/webalizer/distinfo:1.17 Thu Nov 26 16:08:13 2020
+++ pkgsrc/www/webalizer/distinfo Sat Feb 20 14:37:23 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2020/11/26 16:08:13 bsiegert Exp $
+$NetBSD: distinfo,v 1.18 2021/02/20 14:37:23 bsiegert Exp $
SHA1 (webalizer-2.23-08-src.tar.bz2) = 601d5b6557c9916a050544592f5bf9c2ad540f59
RMD160 (webalizer-2.23-08-src.tar.bz2) = 6f1d2ca90d9a891c878e5edb220684869f9fd32c
@@ -11,3 +11,4 @@ SHA1 (patch-ba) = eadf9f9d22c89d441debd9
SHA1 (patch-bb) = d8a5f6f60f53d6de8fc24d3b1844a052be0ad69a
SHA1 (patch-bc) = 98d263cfb585477798f620a6f3690680ce2759b6
SHA1 (patch-bd) = 21f074725a85de5d9d865b84cc88dc04919226d4
+SHA1 (patch-preserve.c) = 5fc85459af088b773073f161a29160a2cff73ba8
Added files:
Index: pkgsrc/www/webalizer/patches/patch-preserve.c
diff -u /dev/null pkgsrc/www/webalizer/patches/patch-preserve.c:1.1
--- /dev/null Sat Feb 20 14:37:24 2021
+++ pkgsrc/www/webalizer/patches/patch-preserve.c Sat Feb 20 14:37:23 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-preserve.c,v 1.1 2021/02/20 14:37:23 bsiegert Exp $
+
+memcpy with overlapping arguments is undefined behavior, use memmove.
+See PR pkg/55809.
+
+--- preserve.c.orig 2013-02-26 05:37:27.000000000 +0000
++++ preserve.c
+@@ -109,7 +109,7 @@ void get_history()
+ yr = hist[i].year;
+ mth= hist[i].month+1;
+ if (mth>12) { mth=1; yr++; }
+- memcpy(&hist[0], &hist[1], sizeof(hist[0])*i);
++ memmove(&hist[0], &hist[1], sizeof(hist[0])*i);
+ memset(&hist[i], 0, sizeof(struct hist_rec));
+ hist[i].year=yr; hist[i].month=mth; n--;
+ }
+@@ -277,7 +277,7 @@ void update_history()
+ yr = hist[i].year;
+ mth= hist[i].month+1;
+ if (mth>12) { mth=1; yr++; }
+- memcpy(&hist[0],&hist[1],sizeof(hist[0])*i);
++ memmove(&hist[0],&hist[1],sizeof(hist[0])*i);
+ memset(&hist[i], 0, sizeof(struct hist_rec));
+ hist[i].year=yr; hist[i].month=mth; n--;
+ }
Home |
Main Index |
Thread Index |
Old Index