aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-25 00:53:39 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-25 00:53:39 -0500
commitaf9a4e8e1695fcbaaeb379bec14ccc03b00341fa (patch)
tree7ce02dfb386d00b9e332bd4fbc3e6566e381da2f
parentpaxelf: reject ELFs with incomplete Ehdr structures (diff)
downloadpax-utils-af9a4e8e1695fcbaaeb379bec14ccc03b00341fa.tar.gz
pax-utils-af9a4e8e1695fcbaaeb379bec14ccc03b00341fa.tar.bz2
pax-utils-af9a4e8e1695fcbaaeb379bec14ccc03b00341fa.zip
dumpelf: free elf after fuzzing it to avoid leaking
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--dumpelf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dumpelf.c b/dumpelf.c
index 5b18326..0afb6c7 100644
--- a/dumpelf.c
+++ b/dumpelf.c
@@ -587,6 +587,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (elf == NULL)
return 0;
dumpelf(elf, 0);
+ unreadelf(elf);
return 0;
}
#else