Hi,
The while loop which extracts subids ( while (length > 0 && (*objidlength)-- > 
0) { ... in asn_parse_objid()) makes *objidlength = -1 for OIDs that 
contain more than 128 subids.
So need "*objidlenth = MAX_OID_LEN;" inside if(0!=NULL).
Please give your comment.

Index: snmplib/asn1.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/snmplib/asn1.c,v
retrieving revision 
diff -u -p -r5.9 asn1.c
@@ -1301,6 +1301,11 @@ asn_parse_objid(u_char * data,
        *oidp++ = (oid) subidentifier;
    }

    if (0 != length) {
        ERROR_MSG("OID length exceeds buffer size");
+     *objidlenth = MAX_OID_LEN;
        return NULL;
    }

    /*
      * The first two subidentifiers are encoded into the first component
      * with the value (X * 40) + Y, where:
===================================================================


With Regards,
Saif


      ___________________________________________________________ 
Yahoo! For Good. Give and get cool things for free, reduce waste and help our 
planet. Plus find hidden Yahoo! treasure 

http://green.yahoo.com/uk/earth-day/

-------------------------------------------------------------------------
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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to