pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/news/leafnode news/leafnode: Backport patch from upcom...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5e29d7a92618
branches: trunk
changeset: 441756:5e29d7a92618
user: micha <micha%pkgsrc.org@localhost>
date: Tue Nov 10 12:03:59 2020 +0000
description:
news/leafnode: Backport patch from upcoming 1.11.12
Prevent stack overruns if /message.id contains filenames >= 1000.
Bump PKGREVISION.
diffstat:
news/leafnode/Makefile | 3 +-
news/leafnode/distinfo | 3 +-
news/leafnode/patches/patch-miscutil.c | 44 ++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+), 2 deletions(-)
diffs (75 lines):
diff -r fac404c50806 -r 5e29d7a92618 news/leafnode/Makefile
--- a/news/leafnode/Makefile Tue Nov 10 11:34:04 2020 +0000
+++ b/news/leafnode/Makefile Tue Nov 10 12:03:59 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.51 2020/01/26 05:26:26 rillig Exp $
+# $NetBSD: Makefile,v 1.52 2020/11/10 12:03:59 micha Exp $
DISTNAME= leafnode-1.11.11
+PKGREVISION= 1
CATEGORIES= news
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=leafnode/}
EXTRACT_SUFX= .tar.bz2
diff -r fac404c50806 -r 5e29d7a92618 news/leafnode/distinfo
--- a/news/leafnode/distinfo Tue Nov 10 11:34:04 2020 +0000
+++ b/news/leafnode/distinfo Tue Nov 10 12:03:59 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2018/09/04 11:00:48 wiz Exp $
+$NetBSD: distinfo,v 1.21 2020/11/10 12:03:59 micha Exp $
SHA1 (leafnode-1.11.11.tar.bz2) = 8e84358748a26ff147ea28120e8b42f5f6deb936
RMD160 (leafnode-1.11.11.tar.bz2) = 78078216a49356250ff843044431a66a0b722ab7
@@ -6,4 +6,5 @@
Size (leafnode-1.11.11.tar.bz2) = 500482 bytes
SHA1 (patch-Makefile.in) = 5ca379bc986a971c27c3287559c7294f7a4e92de
SHA1 (patch-checkpeerlocal.c) = a2754f43c6153ce2f781880ed5bac3b90e72954c
+SHA1 (patch-miscutil.c) = db32f666272c46e7b580d459094178631f275653
SHA1 (patch-xoverutil.c) = eb7c181aa033a587f53d66cd4d05791c60f49a7c
diff -r fac404c50806 -r 5e29d7a92618 news/leafnode/patches/patch-miscutil.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/news/leafnode/patches/patch-miscutil.c Tue Nov 10 12:03:59 2020 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-miscutil.c,v 1.1 2020/11/10 12:03:59 micha Exp $
+
+Leafnode no longer trashes the stack if it, while scanning the message.id
+directory, finds a directory with an all-numeric name that is 1000 or higher.
+https://gitlab.com/leafnode-2/leafnode-1/-/commit/33e7e308d60d774b7f67c1a59851ce3718ed0355
+
+--- miscutil.c.orig 2013-06-10 18:16:31.000000000 +0000
++++ miscutil.c
+@@ -63,13 +63,16 @@ static const mode_t default_umask = 0002
+ struct xoverinfo *xoverinfo;
+ unsigned long xfirst, xlast;
+
++/* kludge around C89 const not being a compile-time constant */
++enum { hashsize = 1000 };
++
+ static int
+ createmsgiddir(void) {
+ mastr *dir = mastr_new(1024);
+ mastr *mid = mastr_new(1024);
+ DIR *d;
+ int rc = 0;
+- int havedir[1000] = {0};
++ int havedir[hashsize] = {0};
+
+ mastr_vcat(dir, spooldir, "/message.id", NULL);
+ d = opendir(mastr_str(dir));
+@@ -84,7 +87,7 @@ createmsgiddir(void) {
+ t = de->d_name;
+ if (isdigit((unsigned char)*t)) {
+ u = strtoul(t, &e, 10);
+- if (e > t)
++ if (e > t && u < hashsize)
+ havedir[u] = 1;
+ }
+ }
+@@ -96,7 +99,7 @@ createmsgiddir(void) {
+ closedir(d);
+
+ /* create missing */
+- for(u = 0; u < 1000; u++) {
++ for(u = 0; u < hashsize; u++) {
+ char b[4];
+
+ snprintf(b, sizeof(b), "%03lu", u);
Home |
Main Index |
Thread Index |
Old Index