search for: add_option_to_device

Displaying 1 result from an estimated 1 matches for "add_option_to_device".

2011 Jun 21
1
[nut-commits] svn commit r3048 - branches/nut-scanner/tools/nut-scanner
...e name aof the device and add "" */ > + memset(buf,0,sizeof(buf)); > + buf[0] = '"'; > + memcpy(buf+1,response->variables->val.string, > + response->variables->val_len); > + buf[1+response->variables->val_len] = '"'; > add_option_to_device(dev,"desc",buf); > add_option_to_device(dev,"mibs",snmp_device_table[index].mib); > /* SNMP v3 */ What is the reason to switch from the (buffer overflow) safe 'snprintf' method to the above unsafe way of doing this? I'm not too thrilled about this. I...