31 lines
832 B
Diff
31 lines
832 B
Diff
From ea47e7a8169187f87a70ff0c1059e99b0d09e659 Mon Sep 17 00:00:00 2001
|
|
From: Panu Matilainen <pmatilai@redhat.com>
|
|
Date: Wed, 22 May 2013 07:24:06 +0300
|
|
Subject: [PATCH] Plug segfault on NULL pointer dereference in debugedit
|
|
(RhBug:929365)
|
|
|
|
- Not sure what the right thing to do would be here, ignoring seems
|
|
like a better option than crashing though...
|
|
---
|
|
tools/debugedit.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/tools/debugedit.c b/tools/debugedit.c
|
|
index f48d6f7..a658d5b 100644
|
|
--- a/tools/debugedit.c
|
|
+++ b/tools/debugedit.c
|
|
@@ -484,6 +484,10 @@ edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase)
|
|
if (phase != 0)
|
|
return 0;
|
|
|
|
+ /* XXX: RhBug:929365, should we error out instead of ignoring? */
|
|
+ if (ptr == NULL)
|
|
+ return 0;
|
|
+
|
|
ptr += off;
|
|
|
|
endcu = ptr + 4;
|
|
--
|
|
1.9.3
|
|
|