svn commit: r338952 - head/usr.sbin/kldxref

Warner Losh imp at FreeBSD.org
Wed Sep 26 19:41:09 UTC 2018


Author: imp
Date: Wed Sep 26 19:41:06 2018
New Revision: 338952
URL: https://svnweb.freebsd.org/changeset/base/338952

Log:
  Relax syntax requirements of source string
  
  The original spec for the strings describing the PNP info didn't allow
  spaces. Several times now people have broken the install by including
  them. Relax the syntax to allow them after the ; which is where
  people's muscle memory tends to put them.
  
  Approved by: re@ (gjb)

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

Modified: head/usr.sbin/kldxref/kldxref.c
==============================================================================
--- head/usr.sbin/kldxref/kldxref.c	Wed Sep 26 19:41:00 2018	(r338951)
+++ head/usr.sbin/kldxref/kldxref.c	Wed Sep 26 19:41:06 2018	(r338952)
@@ -46,6 +46,7 @@
 #include <sys/module.h>
 #define FREEBSD_ELF
 
+#include <ctype.h>
 #include <err.h>
 #include <errno.h>
 #include <fts.h>
@@ -259,6 +260,9 @@ parse_pnp_list(const char *desc, char **new_desc, pnp_
 			strncpy(key, colon + 1, semi - colon - 1);
 			key[semi - colon - 1] = '\0';
 			walker = semi + 1;
+			/* Fail safe if we have spaces after ; */
+			while (walker < ep && isspace(*walker))
+				walker++;
 		} else {
 			if (strlen(colon + 1) >= sizeof(key))
 				goto err;


More information about the svn-src-head mailing list