Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 03:09:31 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353987 - stable/12/stand/common
Message-ID:  <201910240309.x9O39Vr8007169@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Oct 24 03:09:31 2019
New Revision: 353987
URL: https://svnweb.freebsd.org/changeset/base/353987

Log:
  MFC r348499: 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.

Modified:
  stable/12/stand/common/interp_simple.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/common/interp_simple.c
==============================================================================
--- stable/12/stand/common/interp_simple.c	Thu Oct 24 03:08:11 2019	(r353986)
+++ stable/12/stand/common/interp_simple.c	Thu Oct 24 03:09:31 2019	(r353987)
@@ -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?201910240309.x9O39Vr8007169>