On 06/02/2008, Devvrat Tripathi <[EMAIL PROTECTED]> wrote:
>                 snmp_log(LOG_DEBUG,"received request directed to %s....
>                  pdu->contextName.....);

The "contextName" field is not necessarily a null-terminated string.
It will have "contextNameLen" valid characters, but you cannot
then assume that these will be followed by a '\0' terminator.

If you wish to display this via a printf statement, you must
first copy this value into a suitable null-terminated buffer.


> dhandler->contextName=strdup(pdu->contextName);

The same holds true here.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to