image-header.c (__libdw_image_header): Fix tranposed comparison.
authorRoland McGrath <roland@redhat.com>
Fri, 4 Sep 2009 10:05:31 +0000 (03:05 -0700)
committerRoland McGrath <roland@redhat.com>
Fri, 4 Sep 2009 10:05:31 +0000 (03:05 -0700)
libdwfl/ChangeLog
libdwfl/image-header.c

index 39ae70d..5b876d3 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-04  Roland McGrath  <roland@redhat.com>
+
+       * image-header.c (__libdw_image_header): Fix tranposed comparison.
+
 2009-08-27  Roland McGrath  <roland@redhat.com>
 
        * image-header.c: New file.
index 054fba7..6341fc8 100644 (file)
@@ -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;