diff options
author | Alan Modra <amodra@gmail.com> | 2021-12-17 14:54:54 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-12-17 16:01:34 +1030 |
commit | cfabce5ba10ea15158c78bdac732425a46057e42 (patch) | |
tree | 5ce5ded0079f7e82a6cf6e44426de9453e4a320b /bfd/wasm-module.c | |
parent | 9b54b561858b3fb265f57d2b4ddf35fba2603069 (diff) | |
download | fsf-binutils-gdb-cfabce5ba10ea15158c78bdac732425a46057e42.zip fsf-binutils-gdb-cfabce5ba10ea15158c78bdac732425a46057e42.tar.gz fsf-binutils-gdb-cfabce5ba10ea15158c78bdac732425a46057e42.tar.bz2 |
asan: abort in wasm_scan_name_function_section
Macros like READ_LEB128 in wasm-module.c that alter control flow are
evil. Maintainers will break your code if you have hidden ways to
reach labels.
* wasm-module.c (wasm_scan_name_function_section): Don't
attempt to bfd_release NULL.
Diffstat (limited to 'bfd/wasm-module.c')
-rw-r--r-- | bfd/wasm-module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/wasm-module.c b/bfd/wasm-module.c index 9735ebe..ca7e381 100644 --- a/bfd/wasm-module.c +++ b/bfd/wasm-module.c @@ -357,7 +357,8 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) return true; error_return: - bfd_release (abfd, symbols); + if (symbols) + bfd_release (abfd, symbols); return false; } |