Skip to content

Commit 4027ec1

Browse files
committed
Merge #13647: Scripts and tools: Fix BIND_NOW check in security-check.py
37d363d Tools: fix BIND_NOW check in security-check.py (Conrado Gouvea) Pull request description: Previously, the BIND_NOW check would work only if it was the first value in FLAGS. Tree-SHA512: 39cd83f673a6b521803be5585ada516f2db4eede718f0c5aea3377825ed1adcefed5bbb41dd9a5f24a26f7d27116cfc81bde7e26283232593b72768c5ae3d321
2 parents 8fceae0 + 37d363d commit 4027ec1

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)