Date: Wed, 27 Dec 2017 20:33:37 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327246 - head/usr.sbin/devmatch Message-ID: <201712272033.vBRKXbcK095094@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712272033.vBRKXbcK095094>