debug_str_offsets header version and padding are 2 bytes, not 4 bytes
authorMark Wielaard <mark@klomp.org>
Sun, 5 May 2024 18:41:12 +0000 (20:41 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 20 May 2024 11:26:35 +0000 (13:26 +0200)
Reading too much bytes for the header made debugedit skip the first
actual string offsets table entry.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tools/debugedit.c

index 2990f962cd37c7ed2fb3c001c00ece60d31d017f..1307a149de8b41090e8c10d25276f0ebf7c1fc3a 100644 (file)
@@ -2731,10 +2731,10 @@ update_str_offsets (DSO *dso)
       if (unit_length == 0xffffffff || endp - ptr < unit_length)
        break;
       unsigned char *endidxp = ptr + unit_length;
-      uint32_t version = read_32 (ptr);
+      uint32_t version = read_16 (ptr);
       if (version != 5)
        break;
-      uint32_t padding = read_32 (ptr);
+      uint32_t padding = read_16 (ptr);
       if (padding != 0)
        break;
 
This page took 0.072001 seconds and 5 git commands to generate.