svn commit: r565173 - in head/net-mgmt/net-snmp: . files
Ryan Steinmetz
zi at FreeBSD.org
Sat Feb 13 18:54:59 UTC 2021
Author: zi
Date: Sat Feb 13 18:54:58 2021
New Revision: 565173
URL: https://svnweb.freebsd.org/changeset/ports/565173
Log:
- Bring in upstream commit to resolve badly formed responses (92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec)
- Bump PORTREVISION
PR: 253393
Added:
head/net-mgmt/net-snmp/files/patch-92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec (contents, props changed)
Modified:
head/net-mgmt/net-snmp/Makefile
Modified: head/net-mgmt/net-snmp/Makefile
==============================================================================
--- head/net-mgmt/net-snmp/Makefile Sat Feb 13 18:52:49 2021 (r565172)
+++ head/net-mgmt/net-snmp/Makefile Sat Feb 13 18:54:58 2021 (r565173)
@@ -3,7 +3,7 @@
PORTNAME= snmp
PORTVERSION= 5.9
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
Added: head/net-mgmt/net-snmp/files/patch-92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec Sat Feb 13 18:54:58 2021 (r565173)
@@ -0,0 +1,26 @@
+From 92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche at acm.org>
+Date: Mon, 4 Jan 2021 12:21:59 -0800
+Subject: [PATCH] libsnmp: Fix asn_parse_nlength()
+
+Handle length zero correctly.
+
+Fixes: https://github.com/net-snmp/net-snmp/issues/253
+Fixes: a9850f4445cf ("asn parse: add NULL checks, check length lengths")
+---
+ snmplib/asn1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snmplib/asn1.c b/snmplib/asn1.c
+index e983500e7..33c272768 100644
+--- snmplib/asn1.c
++++ snmplib/asn1.c
+@@ -345,7 +345,7 @@ asn_parse_nlength(u_char *pkt, size_t pkt_len, u_long *data_len)
+ * long length; first byte is length of length (after masking high bit)
+ */
+ len_len = (int) ((*pkt & ~0x80) + 1);
+- if ((int) pkt_len <= len_len )
++ if (pkt_len < len_len)
+ return NULL; /* still too short for length and data */
+
+ /* now we know we have enough data to parse length */
More information about the svn-ports-head
mailing list