]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Check sub_ctx instead of ctx when deciding if header has overrun
authorPetr Machata <pmachata@redhat.com>
Wed, 4 Mar 2009 13:05:13 +0000 (14:05 +0100)
committerPetr Machata <pmachata@redhat.com>
Wed, 4 Mar 2009 13:05:13 +0000 (14:05 +0100)
src/dwarflint.c

index 3e125818619557b61d9148becd7fdef290a94e64..d23b776e260a9b9c9cc350451baacde531c4ba2d 100644 (file)
@@ -4651,12 +4651,12 @@ check_line_structural (struct section_data *data,
        }
 
       /* Skip the rest of the header.  */
-      if (ctx.ptr > program_start)
+      if (sub_ctx.ptr > program_start)
        {
          wr_error (&where,
                    ": header claims that it has a size of %#" PRIx64
                    ", but in fact it has a size of %#" PRIx64 ".\n",
-                   header_length, ctx.ptr - program_start + header_length);
+                   header_length, sub_ctx.ptr - program_start + header_length);
          /* Assume that the header lies, and what follows is in
             fact line number program.  */
          retval = false;