Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2016 11:24:12 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310942 - head/contrib/bsnmp/lib
Message-ID:  <201612311124.uBVBOCBe050299@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612311124.uBVBOCBe050299>