From: Roland McGrath Date: Fri, 4 Sep 2009 10:05:31 +0000 (-0700) Subject: image-header.c (__libdw_image_header): Fix tranposed comparison. X-Git-Tag: elfutils-0.143~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de6730c718ea803bba51e699752245094bf674a0;p=thirdparty%2Felfutils.git image-header.c (__libdw_image_header): Fix tranposed comparison. --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 39ae70d40..5b876d338 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2009-09-04 Roland McGrath + + * image-header.c (__libdw_image_header): Fix tranposed comparison. + 2009-08-27 Roland McGrath * image-header.c: New file. diff --git a/libdwfl/image-header.c b/libdwfl/image-header.c index 054fba715..6341fc8c4 100644 --- a/libdwfl/image-header.c +++ b/libdwfl/image-header.c @@ -112,7 +112,7 @@ __libdw_image_header (int fd, off64_t *start_offset, offset += ((*(uint8_t *) (header + H_SETUP_SECTS) ?: 4) + 1) * 512; if (offset > H_END && offset < mapped_size - && mapped_size - length >= offset) + && mapped_size - offset >= length) { /* It looks kosher. Use it! */ *start_offset += offset;