aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-01-20 23:32:17 +1030
committerGitHub <noreply@github.com>2021-01-20 05:02:17 -0800
commit9de297cc736fe5c2579e89d970f366d3703139dc (patch)
tree24bc119e5d27d0a874dadfb4400cd5aafbfb9328
parentc3d69abf148c966f4ea11b2f56856df016fc5b00 (diff)
downloadoss-fuzz-9de297cc736fe5c2579e89d970f366d3703139dc.tar.gz
Issue 27734: binutils:fuzz_readelf: Abrt with empty stacktrace (#4945)
Clear static vars after freeing, to prevent a double-free on the next test iteration.
-rw-r--r--projects/binutils/fuzz_readelf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/projects/binutils/fuzz_readelf.c b/projects/binutils/fuzz_readelf.c
index df5060171..a222e0c09 100644
--- a/projects/binutils/fuzz_readelf.c
+++ b/projects/binutils/fuzz_readelf.c
@@ -47,8 +47,11 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
unlink(filename);
free (dump_ctf_symtab_name);
+ dump_ctf_symtab_name = NULL;
free (dump_ctf_strtab_name);
+ dump_ctf_strtab_name = NULL;
free (dump_ctf_parent_name);
+ dump_ctf_parent_name = NULL;
return 0;
}