components/net-snmp/patches/042.17758422.patch
branchs11u1-sru
changeset 3109 1940d0927363
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/net-snmp/patches/042.17758422.patch	Fri May 02 12:23:29 2014 +0200
@@ -0,0 +1,31 @@
+This has been fixed in upstream version 5.7.2 (see README).
+http://sourceforge.net/p/net-snmp/code/ci/4d38895f459a1df24f68c4a60e4caf6a778d8c1f
+
+--- a/agent/mibgroup/agent/extend.c
++++ b/agent/mibgroup/agent/extend.c
[email protected]@ -473,10 +473,21 @@ extend_parse_config(const char *token, char *cptr)
+             
+     } else if (!strcmp( token, "sh"   ) ||
+                !strcmp( token, "exec" )) {
+-        if ( num_compatability_entries == max_compatability_entries )
++        if ( num_compatability_entries == max_compatability_entries ) {
+             /* XXX - should really use dynamic allocation */
+-            config_perror("No further UCD-compatible entries" );
+-        else
++            netsnmp_old_extend *new_compatability_entries;
++            new_compatability_entries = realloc(compatability_entries,
++                             max_compatability_entries*2*sizeof(netsnmp_old_extend));
++            if (!new_compatability_entries)
++                config_perror("No further UCD-compatible entries" );
++            else {
++                memset(new_compatability_entries+num_compatability_entries, 0,
++                        sizeof(netsnmp_old_extend)*max_compatability_entries);
++                max_compatability_entries *= 2;
++                compatability_entries = new_compatability_entries;
++            }
++        }
++        if (num_compatability_entries != max_compatability_entries)
+             compatability_entries[
+                 num_compatability_entries++ ].exec_entry = extension;
+     }
+