> I wrote a small program that sends traps using the net snmp api.
> 
> Got a segmentation error when executing this program and on debugging
> it pointed to a malloc inside method snmp_varlist_add_variable().

I can't immediately spot any problem with the code fragment you listed.
It looks almost identical to equivalent code within agent_trap.c

You said that the error occurred within 'snmp_varlist_add_variable()'
Exactly whereabouts did this happen?   There are two instances of
'malloc' in this routine, and I can't see any obvious problems with
either of them.
  It might help to know which one we're talking about, and what
the relevant parameters are.  In particular, it's probably worth
looking at the 'value' and 'len' parameters.

Dave




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to