svn commit: r310942 - head/contrib/bsnmp/lib
Ngie Cooper
ngie at FreeBSD.org
Sat Dec 31 11:24:13 UTC 2016
Author: ngie
Date: Sat Dec 31 11:24:12 2016
New Revision: 310942
URL: https://svnweb.freebsd.org/changeset/base/310942
Log:
Unbreak the build by passing the string to strdup, not its length
MFC after: 1 week
X-MFC with: r310931
Pointyhat to: ngie
Modified:
head/contrib/bsnmp/lib/snmpclient.c
Modified: head/contrib/bsnmp/lib/snmpclient.c
==============================================================================
--- head/contrib/bsnmp/lib/snmpclient.c Sat Dec 31 11:23:43 2016 (r310941)
+++ head/contrib/bsnmp/lib/snmpclient.c Sat Dec 31 11:24:12 2016 (r310942)
@@ -1945,7 +1945,7 @@ snmp_parse_server(struct snmp_client *sc
} else if (p > s) {
/* host */
free(sc->chost);
- if ((sc->chost = strdup(strlen(s))) == NULL) {
+ if ((sc->chost = strdup(s)) == NULL) {
seterr(sc, "%s", strerror(errno));
return (-1);
}
More information about the svn-src-all
mailing list