This is a discussion on Re: Check to prevent snmp request/response oid length more than 128 within the SNMP Coders forums, part of the Networking and Network Related category; 2008/5/3 saifulla Mohd Abdul <msaifulla@yahoo.com>: > Hi, > The while loop which extracts subids ( ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
2008/5/3 saifulla Mohd Abdul <msaifulla@yahoo.com>:
> 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. No. The library routine does not know how large the original buffer was. It was *probably* MAX_OID_LEN, but the routine should not blindly assume this. It *might* be appropriate to cache the original length at the start of the routine, and restore this value in case of over-run. But it certainly wouldn't be right to force a length of MAX_OID_LEN. 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;198757...un.com/javaone _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |
![]() |
| Thread Tools | |
| Display Modes | |
|
|