1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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)
This commit is contained in:
Warner Losh 2018-09-26 19:41:06 +00:00
parent b28589287b
commit 517a1827f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338952

View File

@ -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_list *list)
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;