From 89810658282acddb82032a6f1f3cfde2b7f5e036 Mon Sep 17 00:00:00 2001 From: harti Date: Tue, 31 Jan 2006 14:59:07 +0000 Subject: Vendor patch: prevent a core dump when the trace option is not followed by an option value. Submitted by: Shteryana Shopova --- contrib/bsnmp/snmpd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib/bsnmp') diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index 02ae93e..32ccc45 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -1386,7 +1386,9 @@ main(int argc, char *argv[]) if (value == NULL) syslog(LOG_ERR, "no value for 'trace'"); - snmp_trace = strtoul(value, NULL, 0); + else + snmp_trace = + strtoul(value, NULL, 0); break; case -1: -- cgit v1.1