svn commit: r348499 - head/stand/common
Rebecca Cran
bcran at FreeBSD.org
Sat Jun 1 19:47:16 UTC 2019
Author: bcran
Date: Sat Jun 1 19:47:15 2019
New Revision: 348499
URL: https://svnweb.freebsd.org/changeset/base/348499
Log:
Fix comment parsing in interp_simple.c
loader.rc has comment lines without a trailing space, which get
interpreted as commands. Avoid this by only matching against the
backslash character.
Reviewed by: imp, tsoome
Differential Revision: https://reviews.freebsd.org/D20491
Modified:
head/stand/common/interp_simple.c
Modified: head/stand/common/interp_simple.c
==============================================================================
--- head/stand/common/interp_simple.c Sat Jun 1 18:26:07 2019 (r348498)
+++ head/stand/common/interp_simple.c Sat Jun 1 19:47:15 2019 (r348499)
@@ -114,7 +114,7 @@ interp_include(const char *filename)
line++;
flags = 0;
/* Discard comments */
- if (strncmp(input+strspn(input, " "), "\\ ", 2) == 0)
+ if (strncmp(input+strspn(input, " "), "\\", 1) == 0)
continue;
cp = input;
/* Echo? */
More information about the svn-src-all
mailing list