[Pkg-net-snmp-commits] r119 - branches/net-snmp52/debian/patches
Jochen Friedrich
jochen at alioth.debian.org
Wed Dec 20 18:13:36 CET 2006
Author: jochen
Date: 2006-12-20 18:13:36 +0100 (Wed, 20 Dec 2006)
New Revision: 119
Added:
branches/net-snmp52/debian/patches/30_check_duplicates.README
branches/net-snmp52/debian/patches/30_check_duplicates.patch
Log:
Fix memory management bug caused by duplicate container entries (backported
from 5.3.1).
Added: branches/net-snmp52/debian/patches/30_check_duplicates.README
===================================================================
--- branches/net-snmp52/debian/patches/30_check_duplicates.README 2006-12-20 15:41:01 UTC (rev 118)
+++ branches/net-snmp52/debian/patches/30_check_duplicates.README 2006-12-20 17:13:36 UTC (rev 119)
@@ -0,0 +1,2 @@
+Backport of revision 1.20 of snmplib/container_binary_array.c:
+Check for duplicates before inserting entries into a binary array.
Added: branches/net-snmp52/debian/patches/30_check_duplicates.patch
===================================================================
--- branches/net-snmp52/debian/patches/30_check_duplicates.patch 2006-12-20 15:41:01 UTC (rev 118)
+++ branches/net-snmp52/debian/patches/30_check_duplicates.patch 2006-12-20 17:13:36 UTC (rev 119)
@@ -0,0 +1,19 @@
+--- net-snmp-5.2.3.orig/snmplib/container_binary_array.c 2006-12-20 16:23:12.000000000 +0100
++++ net-snmp-5.2.3/snmplib/container_binary_array.c 2006-12-20 16:25:22.000000000 +0100
+@@ -338,6 +338,16 @@
+ void *new_data; /* Used for * a) extending the data table
+ * * b) the next entry to use */
+
++ /*
++ * check for duplicates
++ */
++
++ new_data = netsnmp_binary_array_get(c, entry, 1);
++ if (NULL != new_data) {
++ DEBUGMSGTL(("container","not inserting duplicate key\n"));
++ return -1;
++ }
++
+ if (t->max_size <= t->count) {
+ /*
+ * Table is full, so extend it to double the size
More information about the Pkg-net-snmp-commits
mailing list