]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
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 39ae70d404e29488afbe9c33e8cde43fb3f7dbf4..5b876d338782e61a352ba8809bda6d10d4c1ae7c 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 054fba71579769d3f87f8dde236b9bc8e7ad58cd..6341fc8c4cd450fffc82c1f6f796e5cd8d9a0f92 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;