- (snmpusm.c): more error checking in the MAKE_ENTRY macro.
git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@2986 06827809-a52a-0410-b366-d66718629ded
diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c
index 22cb1ae..12ccae9 100644
--- a/snmplib/snmpusm.c
+++ b/snmplib/snmpusm.c
@@ -94,6 +94,11 @@
*/
#define MAKE_ENTRY( type, item, len, field, field_len ) \
{ \
+ if (len == 0 || item == NULL) { \
+ ref->field = NULL; \
+ ref->field_len = 0; \
+ return 0; \
+ } \
if (ref == NULL) \
return -1; \
if (ref->field != NULL) { \