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);
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to