From de6730c718ea803bba51e699752245094bf674a0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 4 Sep 2009 03:05:31 -0700 Subject: [PATCH] image-header.c (__libdw_image_header): Fix tranposed comparison. --- libdwfl/ChangeLog | 4 ++++ libdwfl/image-header.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- 2.47.2