Hi!

> case TR_MIB_STR :
> value = (char *) val->s;
>         if (!value) {
>             value = "";
>         }
>         TR_DEBUG_D(TR_SNMP_DEBUG_REQ, "Returning value type 
> ASN_OCTET_STR, value %s", value);
>         snmp_set_var_typed_value(idx, ASN_OCTET_STR, value, strlen(value));
> 

No, no, no! 'value' is not NULL terminated. strlen could return
anything, and a crash seems inevitable if the MAC address contained no
zeros. Try replacing strlen(value) with 6.

HTH,

Stavros

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
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