aboutsummaryrefslogtreecommitdiff
path: root/libelf/elf_compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'libelf/elf_compress.c')
-rw-r--r--libelf/elf_compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c
index f13b41ba..e3ecab32 100644
--- a/libelf/elf_compress.c
+++ b/libelf/elf_compress.c
@@ -421,7 +421,7 @@ __libelf_decompress_zstd (void *buf_in, size_t size_in, size_t size_out)
}
size_t ret = ZSTD_decompress (buf_out, size_out, buf_in, size_in);
- if (ZSTD_isError (ret))
+ if (unlikely (ZSTD_isError (ret)) || unlikely (ret != size_out))
{
free (buf_out);
__libelf_seterrno (ELF_E_DECOMPRESS_ERROR);