Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2018 19:41:06 +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: r338952 - head/usr.sbin/kldxref
Message-ID:  <201809261941.w8QJf6Za068800@repo.freebsd.org>

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



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