]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use strdup in snmp_parse_server(..) when possible instead of malloc+strcpy
authorngie <ngie@FreeBSD.org>
Sat, 31 Dec 2016 11:13:00 +0000 (11:13 +0000)
committerngie <ngie@FreeBSD.org>
Sat, 31 Dec 2016 11:13:00 +0000 (11:13 +0000)
commit6069019fc003675e4a4a190392f77ee747688a4b
tree8e6667c123990fd43cf319395bfd1b399ab37bbe
parenta76ec14db41a6a7a8990d3ad8a765738f37f1eff
Use strdup in snmp_parse_server(..) when possible instead of malloc+strcpy

This simplifies the code and mutes a Coverity warning about sc->cport being
improperly allocated

Reported by: Coverity
CID: 1018247
MFC after: 1 week
contrib/bsnmp/lib/snmpclient.c