Skip to content

Commit 37d363d

Browse files
authored
Tools: fix BIND_NOW check in security-check.py
Previously, the BIND_NOW check would work only if it was the first value in FLAGS.
1 parent dcb154e commit 37d363d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/devtools/security-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def check_ELF_RELRO(executable):
9797
raise IOError('Error opening file')
9898
for line in stdout.splitlines():
9999
tokens = line.split()
100-
if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2]):
100+
if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]):
101101
have_bindnow = True
102102
return have_gnu_relro and have_bindnow
103103

0 commit comments

Comments
 (0)