diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py index c9516ef83..47195f73c 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/devtools/security-check.py @@ -97,7 +97,7 @@ def check_ELF_RELRO(executable): raise IOError('Error opening file') for line in stdout.splitlines(): tokens = line.split() - if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2]): + if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]): have_bindnow = True return have_gnu_relro and have_bindnow