2019-07-26 09:21:14 |
xiaodonghu |
description |
In the 200th line of the fault\snmp-audittrail\sources\snmpAuditPlugin.c file, the pointer parameter value of the free function may be NULL(the pointer value has been checked in the previous snmp_log function), so this pointer needs to be checked before the free function is called. |
The function sprint_realloc_objid may return NULL in abnormal case.
So, the function fmtoid and fmtmsg_var may return NULL.
However, in these function log_results log_pdu_header and log_invalid_oid_trees, the tempory value var_str point to the return value of fmtmsg_var may be NULL.
In these function, snmp_log have checked whether var_str is NULL or not, but free doesn't check it.
When the var_str is NULL, free(NULL) will make the program crashed.
So we need to add the checking before free function. |
|