* [PATCH] readelf: maximum operations per instruction cannot be zero in .debug_line.
@ 2014-12-07 22:46 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-12-07 22:46 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
src/ChangeLog | 5 +++++
src/readelf.c | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/src/ChangeLog b/src/ChangeLog
index ccbd6e8..1c3cf2f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2014-12-07 Mark Wielaard <mjw@redhat.com>
+ * readelf.c (print_debug_line_section): max_ops_per_instr cannot
+ be zero.
+
+2014-12-07 Mark Wielaard <mjw@redhat.com>
+
* readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
and DW_OP_GNU_implicit_pointer.
diff --git a/src/readelf.c b/src/readelf.c
index 881bb45..fa9ede1 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -6506,6 +6506,14 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
op_index = (op_index + op_advance) % max_ops_per_instr;
}
+ if (max_ops_per_instr == 0)
+ {
+ error (0, 0,
+ gettext ("invalid maximum operations per instruction is zero"));
+ linep = lineendp;
+ continue;
+ }
+
while (linep < lineendp)
{
size_t offset = linep - (const unsigned char *) data->d_buf;
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] readelf: maximum operations per instruction cannot be zero in .debug_line.
@ 2014-12-11 14:18 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-12-11 14:18 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
On Sun, 2014-12-07 at 23:46 +0100, Mark Wielaard wrote:
> 2014-12-07 Mark Wielaard <mjw@redhat.com>
>
> + * readelf.c (print_debug_line_section): max_ops_per_instr cannot
> + be zero.
I pushed this to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-11 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-07 22:46 [PATCH] readelf: maximum operations per instruction cannot be zero in .debug_line Mark Wielaard
2014-12-11 14:18 Mark Wielaard
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).