pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/cups-filters print/cups-filters: fix an snprintf...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7f5f62cacd72
branches:  trunk
changeset: 385523:7f5f62cacd72
user:      he <he%pkgsrc.org@localhost>
date:      Sun Sep 18 14:41:07 2022 +0000

description:
print/cups-filters: fix an snprintf() length issue.

...found on a 32-bit host, use not size of pointer but size of allocation.
Bump PKGREVISION.

diffstat:

 print/cups-filters/Makefile                           |   4 ++--
 print/cups-filters/distinfo                           |   3 ++-
 print/cups-filters/patches/patch-utils_cups-browsed.c |  15 +++++++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 19bc619ee756 -r 7f5f62cacd72 print/cups-filters/Makefile
--- a/print/cups-filters/Makefile       Sun Sep 18 13:50:00 2022 +0000
+++ b/print/cups-filters/Makefile       Sun Sep 18 14:41:07 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.164 2022/08/06 17:24:03 he Exp $
+# $NetBSD: Makefile,v 1.165 2022/09/18 14:41:07 he Exp $
 
 DISTNAME=      cups-filters-1.28.15
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    print
 MASTER_SITES=  http://openprinting.org/download/cups-filters/
 EXTRACT_SUFX=  .tar.xz
diff -r 19bc619ee756 -r 7f5f62cacd72 print/cups-filters/distinfo
--- a/print/cups-filters/distinfo       Sun Sep 18 13:50:00 2022 +0000
+++ b/print/cups-filters/distinfo       Sun Sep 18 14:41:07 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.78 2022/05/10 20:57:35 markd Exp $
+$NetBSD: distinfo,v 1.79 2022/09/18 14:41:07 he Exp $
 
 BLAKE2s (cups-filters-1.28.15.tar.xz) = f13ded9ee7fdcde6debe2590ef189a2a2a2df16ae952e601a1609e650ff90abe
 SHA512 (cups-filters-1.28.15.tar.xz) = cc8d43bba6edb2b839f3be5fcbcdeb7633ed0f0f0c2737bcc6957cf95fb4ded8ee412358cc95fdbf289ae897dd0b7f32e689f02d191a8f15930eb4d2deefd74c
@@ -7,3 +7,4 @@
 SHA1 (patch-filter_mupdftoraster.c) = 81a06cbb3be9a7fd3e797a2effa5ef0aecfc2621
 SHA1 (patch-fontembed_test__pdf.c) = 5ffb13a59ed4d860a3ae4355e364059973715290
 SHA1 (patch-fontembed_test__ps.c) = 70f9ab9c8f74ab96abe04cda926a7116386d5f2e
+SHA1 (patch-utils_cups-browsed.c) = 7aca6e830eebe8dde48e23f04b5d3b5a4820b208
diff -r 19bc619ee756 -r 7f5f62cacd72 print/cups-filters/patches/patch-utils_cups-browsed.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-filters/patches/patch-utils_cups-browsed.c     Sun Sep 18 14:41:07 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-utils_cups-browsed.c,v 1.7 2022/09/18 14:41:07 he Exp $
+
+Fix a rather obvious bug, should pass length of allocation...
+
+--- utils/cups-browsed.c.orig  2022-04-11 19:56:40.000000000 +0000
++++ utils/cups-browsed.c
+@@ -10242,7 +10242,7 @@ static void resolve_callback(AvahiServic
+                  address->proto == AVAHI_PROTO_INET6 &&
+                  interface != AVAHI_IF_UNSPEC &&
+                  IPBasedDeviceURIs != IP_BASED_URIS_IPV4_ONLY) {
+-        strncpy(addrstr, "[v1.", sizeof(addrstr) - 1);
++        strncpy(addrstr, "[v1.", 255); /* size of allocation - 1 for null */
+         avahi_address_snprint(addrstr + 4, 256 - 6, address);
+         addrlen = strlen(addrstr + 4);
+         addr->sa_family = AF_INET6;



Home | Main Index | Thread Index | Old Index