Author: imp
Date: Wed Dec 27 20:33:37 2017
New Revision: 327246
URL: https://svnweb.freebsd.org/changeset/base/327246

Log:
  Use strl* here too.
  
  CID: 1383969

Modified:
  head/usr.sbin/devmatch/devmatch.c

Modified: head/usr.sbin/devmatch/devmatch.c
==============================================================================
--- head/usr.sbin/devmatch/devmatch.c   Wed Dec 27 20:09:50 2017        
(r327245)
+++ head/usr.sbin/devmatch/devmatch.c   Wed Dec 27 20:33:37 2017        
(r327246)
@@ -195,12 +195,12 @@ pnpval_as_str(const char *val, const char *pnpinfo)
        cp = strchr(val, ';');
        key[0] = ' ';
        if (cp == NULL)
-               strcpy(key + 1, val);
+               strlcpy(key + 1, val, sizeof(key) - 1);
        else {
                memcpy(key + 1, val, cp - val);
                key[cp - val + 1] = '\0';
        }
-       strcat(key, "=");
+       strlcat(key, "=", sizeof(key));
        if (strncmp(key + 1, pnpinfo, strlen(key + 1)) == 0)
                quoted_strcpy(retval, pnpinfo + strlen(key + 1));
        else {
_______________________________________________
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