projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8181f00
)
asan: NULL deref in filter_symbols
author
Alan Modra
<amodra@gmail.com>
Wed, 23 Nov 2022 11:37:03 +0000
(22:07 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 23 Nov 2022 12:08:48 +0000
(22:38 +1030)
If tdata->symbols is NULL, make tdata->symcount zero too. This makes
wasm_get_symtab_upper_bound return the proper result and stops
cascading errors.
* wasm-module.c (wasm_scan_name_function_section): Clear
tdata->symcount on error.
bfd/wasm-module.c
patch
|
blob
|
history
diff --git
a/bfd/wasm-module.c
b/bfd/wasm-module.c
index 2c2c6c7286359ff0b42b0fa857653920730f63ff..c96665b6e91a27266da29242c0016c9a382a8642 100644
(file)
--- a/
bfd/wasm-module.c
+++ b/
bfd/wasm-module.c
@@
-359,6
+359,7
@@
wasm_scan_name_function_section (bfd *abfd, sec_ptr asect)
error_return:
if (symbols)
bfd_release (abfd, symbols);
+ tdata->symcount = 0;
return false;
}