* [PATCH] readelf: Check there is enough room for the DW_LNE_set_address argument
@ 2014-12-15 10:36 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2014-12-15 10:36 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
src/ChangeLog | 5 +++++
src/readelf.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/ChangeLog b/src/ChangeLog
index a4f42e4..7247ea9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (print_debug_line_section): Check there is enough room
+ for DW_LNE_set_address argument.
+
2014-12-14 Mark Wielaard <mjw@redhat.com>
* elflint.c (check_attributes): Call get_uleb128 with end pointer.
diff --git a/src/readelf.c b/src/readelf.c
index 51ce020..faaa6d1 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -6609,6 +6609,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
case DW_LNE_set_address:
op_index = 0;
+ if (unlikely ((size_t) (lineendp - linep) < address_size))
+ goto invalid_unit;
if (address_size == 4)
address = read_4ubyte_unaligned_inc (dbg, linep);
else
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-15 10:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 10:36 [PATCH] readelf: Check there is enough room for the DW_LNE_set_address argument 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).