diff options
author | Nicolas Cavallari <nicolas.cavallari@green-communications.fr> | 2018-03-07 10:48:12 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-03-31 23:02:14 +0200 |
commit | 42be6b6153ba0fdbd2152944e86f7cb180b55012 (patch) | |
tree | 3244fb28cf4886ccb8c7661b8517f3a6629e8291 | |
parent | 5899a8326f0fd46283732f07dea888907b763919 (diff) | |
download | buildroot-42be6b6153ba0fdbd2152944e86f7cb180b55012.tar.gz buildroot-42be6b6153ba0fdbd2152944e86f7cb180b55012.zip |
check-package: Flag usage of '\t \\$'.
check-package would flag tabs before a backslash ('\t\\'),
two spaces before a backslash (' \\') but would not flag a tab before space
before backslash ('\t \\'), allowing someone to bypass the check.
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r-- | utils/checkpackagelib/lib_mk.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py index 2df2e1a884..cfd4d05117 100644 --- a/utils/checkpackagelib/lib_mk.py +++ b/utils/checkpackagelib/lib_mk.py @@ -123,7 +123,7 @@ class RemoveDefaultPackageSourceVariable(_CheckFunction): class SpaceBeforeBackslash(_CheckFunction): - TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH = re.compile(r"^.*( |\t)\\$") + TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH = re.compile(r"^.*( |\t ?)\\$") def check_line(self, lineno, text): if self.TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH.match(text.rstrip()): |