Re: Re: Re: strange that trapsess causes Segmentation fault when running

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2008/5/7 Dave Shield <[email protected]>:
> OK - I've managed to reproduce the problem.
>
> It also seems to be fixed in the current development code.
> It's just the released versions that suffer from this problem.

Wrong.
It *is* still present in the current development code.
(It was a different choice of default version that was
 masking the problem earlier).

The attached patch seems to fix things.
It's been applied to all active lines.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
trapsess.patch (text/x-patch, 501 B)
Index: snmplib/snmp_api.c
===================================================================
--- snmplib/snmp_api.c	(revision 16901)
+++ snmplib/snmp_api.c	(working copy)
@@ -1611,6 +1611,7 @@
     if (SNMP_FLAGS_USER_CREATED == (session->flags & SNMP_FLAGS_USER_CREATED) ||
         session->securityModel != SNMP_SEC_MODEL_USM ||
         session->version != SNMP_VERSION_3 ||
+        session->securityNameLen == 0 ||
         session->securityEngineIDLen == 0)
         return SNMPERR_SUCCESS;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.