[google/syzkaller] 87840e: pkg/config: fix comments stripping

0 views
Skip to first unread message

Marco Elver

unread,
Sep 27, 2022, 6:34:00 AMSep 27
to syzk...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/google/syzkaller
Commit: 87840e0023f7adfb7ff928a8a5057932ea9aeab9
https://github.com/google/syzkaller/commit/87840e0023f7adfb7ff928a8a5057932ea9aeab9
Author: Marco Elver <el...@google.com>
Date: 2022-09-27 (Tue, 27 Sep 2022)

Changed paths:
M pkg/config/config.go
M pkg/mgrconfig/testdata/gce1.cfg

Log Message:
-----------
pkg/config: fix comments stripping

The comment-stripping regex doesn't work for multi-line comments,
because the regex looks for a substring that both starts _and_ ends with
a newline character. Since a single newline cannot be used into multiple
matches, only the first comment line is found and later lines are not
removed resulting in a parsing error.

Fix it by looking for substrings _until_ a newline.


Reply all
Reply to author
Forward
0 new messages