cups: configure: disable acl
[14.07/packages.git] / net / mini_snmpd / patches / 103-mib_encode_snmp_element_oid_fix.patch
1 --- a/mib.c
2 +++ b/mib.c
3 @@ -120,6 +120,9 @@ static int encode_snmp_element_oid(value
4         int length;
5         int i;
6  
7 +       if (oid_value == NULL) {
8 +               return -1;
9 +       }
10         buffer = value->data.buffer;
11         length = 1;
12         for (i = 2; i < oid_value->subid_list_length; i++) {
13 @@ -310,6 +313,8 @@ static int mib_build_entry(const oid_t *
14                         value->data.buffer = malloc(value->data.max_length);
15                         memset(value->data.buffer, 0, value->data.max_length);
16                         if (encode_snmp_element_oid(value, oid_aton((const char *)default_value)) == -1) {
17 +                               lprintf(LOG_ERR, "could not create MIB entry '%s.%d.%d': invalid oid '%s'\n",
18 +                                       oid_ntoa(prefix), column, row, (char *)default_value);
19                                 return -1;
20                         }
21                         break;