From: Mark Wielaard <mark@klomp.org>
To: debugedit@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] debug_str_offsets header version and padding are 2 bytes, not 4 bytes
Date: Thu, 16 May 2024 00:02:08 +0200 [thread overview]
Message-ID: <20240515220208.1129397-1-mark@klomp.org> (raw)
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/debugedit.c b/tools/debugedit.c
index 1a46c13dee47..cbfe70970743 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -2724,10 +2724,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;
--
2.39.3
next reply other threads:[~2024-05-15 22:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 22:02 Mark Wielaard [this message]
2024-05-20 11:29 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240515220208.1129397-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=debugedit@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).