]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Check for SNMP objid memory allocation failures (#2162)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Tue, 2 Sep 2025 11:36:42 +0000 (11:36 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 2 Sep 2025 16:25:42 +0000 (16:25 +0000)
lib/snmplib/snmp_vars.c

index 41a28e6a56cbd19dbdaf751d9720469a168db29e..6184220630ebe1f34cb21f63eca4c693c89e8f09 100644 (file)
@@ -528,7 +528,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
                                    &Var->type, TmpBuf, &Var->val_len);
             Var->val_len *= sizeof(oid);
             Var->val.objid = (oid *) xmalloc((unsigned) Var->val_len);
-            if (Var->val.integer == NULL) {
+            if (Var->val.objid == NULL) {
                 snmp_set_api_error(SNMPERR_OS_ERR);
                 PARSE_ERROR;
             }