Date: Sat, 1 Jun 2019 19:47:15 +0000 (UTC) From: Rebecca Cran <bcran@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348499 - head/stand/common Message-ID: <201906011947.x51JlFQr089470@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906011947.x51JlFQr089470>