* Re: [PATCH] readelf: Fix typo in a check in handle_relocs_rela
@ 2014-09-23 12:25 Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2014-09-23 12:25 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Sun, 2014-09-14 at 01:03 +0200, Petr Machata wrote:
> - Testing shdr makes no sense, that pointer was dereferenced several
> times throughout the section. destshdr on the other hand is not
> tested at all.
>
> +2014-09-14 Petr Machata <pmachata@redhat.com>
> +
> + * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
Yes, seems obviously correct to me. The else branch would crash and burn
when trying to dereference destshdr->sh_name otherwise.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] readelf: Fix typo in a check in handle_relocs_rela
@ 2014-09-23 13:07 Petr Machata
0 siblings, 0 replies; 4+ messages in thread
From: Petr Machata @ 2014-09-23 13:07 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 24 bytes --]
Pushed.
Thanks,
PM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] readelf: Fix typo in a check in handle_relocs_rela
@ 2014-09-22 22:15 Petr Machata
0 siblings, 0 replies; 4+ messages in thread
From: Petr Machata @ 2014-09-22 22:15 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 22 bytes --]
Ping.
Thanks,
PM
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] readelf: Fix typo in a check in handle_relocs_rela
@ 2014-09-13 23:03 Petr Machata
0 siblings, 0 replies; 4+ messages in thread
From: Petr Machata @ 2014-09-13 23:03 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]
- Testing shdr makes no sense, that pointer was dereferenced several
times throughout the section. destshdr on the other hand is not
tested at all.
Signed-off-by: Petr Machata <pmachata@redhat.com>
---
src/ChangeLog | 4 ++++
src/readelf.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index aa98608..a252cdc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-14 Petr Machata <pmachata@redhat.com>
+
+ * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
+
2014-09-12 Petr Machata <pmachata@redhat.com>
* readelf.c (encoded_ptr_size): In the switch statement, change
diff --git a/src/readelf.c b/src/readelf.c
index 7b43a65..4d3bb36 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -2090,7 +2090,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
? xndx : sym->st_shndx),
&destshdr_mem);
- if (unlikely (shdr == NULL))
+ if (unlikely (destshdr == NULL))
printf (" %#0*" PRIx64 " %-15s <%s %ld>\n",
class == ELFCLASS32 ? 10 : 18, rel->r_offset,
ebl_reloc_type_check (ebl, GELF_R_TYPE (rel->r_info))
--
1.7.6.5
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-23 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23 12:25 [PATCH] readelf: Fix typo in a check in handle_relocs_rela Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2014-09-23 13:07 Petr Machata
2014-09-22 22:15 Petr Machata
2014-09-13 23:03 Petr Machata
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).