From: Joshua Rogers Date: Tue, 2 Sep 2025 11:36:42 +0000 (+0000) Subject: Check for SNMP objid memory allocation failures (#2162) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=inline;p=thirdparty%2Fsquid.git Check for SNMP objid memory allocation failures (#2162) --- diff --git a/lib/snmplib/snmp_vars.c b/lib/snmplib/snmp_vars.c index 41a28e6a56..6184220630 100644 --- a/lib/snmplib/snmp_vars.c +++ b/lib/snmplib/snmp_vars.c @@ -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; }