asan: NULL deref in filter_symbols
authorAlan Modra <amodra@gmail.com>
Wed, 23 Nov 2022 11:37:03 +0000 (22:07 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 23 Nov 2022 12:08:48 +0000 (22:38 +1030)
commitd499fb89448c3f2e061813f12a1b63fbaa29422e
tree7c890950c7175781603eb8d96f26f444a7fa3ed1
parent8181f0045df765a7f28db745f4a8bd3c5a1da82d
asan: NULL deref in filter_symbols

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