2008/5/3 saifulla Mohd Abdul <[EMAIL PROTECTED]>:
> 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;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders