libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit e93492b823b729a1db476335df44156ae55eef07
parent 847d8bf7935b059a080dc98d3e940d474df6aca9
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 30 Jun 2026 18:39:43 +0200

avoid signed/unsigned cmp

Diffstat:
Msrc/plugins/elf_extractor.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/plugins/elf_extractor.c b/src/plugins/elf_extractor.c @@ -349,7 +349,7 @@ get_section_header (struct EXTRACTOR_ExtractContext *ec, size = ec->read (ec->cls, &data, sizeof (*ret)); - if (size < sizeof (*ret)) + if (size < (ssize_t) sizeof (*ret)) return -1; EXTRACTOR_common_cat_unpack (data, ELF_SECTION_SPECS[bo], @@ -390,7 +390,7 @@ getDynTag (struct EXTRACTOR_ExtractContext *ec, size = ec->read (ec->cls, &data, sizeof (*ret)); - if (size < sizeof (*ret)) + if (size < (ssize_t) sizeof (*ret)) return -1; EXTRACTOR_common_cat_unpack (data, ELF_DYN_SPECS[bo], @@ -424,7 +424,7 @@ getProgramHdr (struct EXTRACTOR_ExtractContext *ec, size = ec->read (ec->cls, &data, sizeof (*ret)); - if (size < sizeof (*ret)) + if (size < (ssize_t) sizeof (*ret)) return -1; EXTRACTOR_common_cat_unpack (data, ELF_PHDR_SPECS[bo],