bin/symbols-check: fix fields length condition before accessing fields

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit e626636e90)
This commit is contained in:
Eric Engestrom 2025-06-29 16:58:01 +02:00 committed by Eric Engestrom
parent 41d9e42b27
commit 8d4df0c45d
2 changed files with 2 additions and 2 deletions

View file

@ -7994,7 +7994,7 @@
"description": "bin/symbols-check: fix fields length condition before accessing fields",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -66,7 +66,7 @@ def get_symbols_nm(nm, lib):
stderr=open(os.devnull, 'w')).decode("ascii")
for line in output.splitlines():
fields = line.split()
if len(fields) == 2 or fields[1] == 'U':
if len(fields) == 2 and fields[1] == 'U':
continue
symbol_name = fields[0]
if platform_name == 'Linux' or platform_name == 'GNU' or platform_name.startswith('GNU/'):