Den 20-08-2014 kl. 02:57 skrev L'oiseau de mer:
>          case MODE_SET_ACTION:
>          strncpy(A, requests->requestvb->val.string,
>                          sizeof(A));
>          A[sizeof(A)-1]='\0';

A SNMP string is not a 0-terminated C string. You must respect (and 
save) the length of the string passed in the request (requestvb->val_len).

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to