On Wed, 2005-06-22 at 10:13, aakansha rajvi wrote:
> Since requests->requestvb->val.string holds the value what we setting
> ,I am copying this value into the string rcommunity
> 
> strcpy(struct_obj.rcommunity,(void *)(requests->requestvb->val.string));

You need to take account of the 'requests->requestvb->val_len' field,
which specifies how much valid data is present.
Try
    strncpy( struct_obj.rcommunity,
             (void *)(requests->requestvb->val.string),
              requests->requestvb->val_len);


Dave



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to