Re: Check to prevent snmp request/response oid length more than 128

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 ( ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-04-2008
Dave Shield
 
Posts: n/a
Default Re: Check to prevent snmp request/response oid length more than 128

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:00 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0