michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame SOURCES/0003-debugedit-Make-sure-.debug_line-old-new-idx-start-eq.patch

ed184b
From 00a0afd5e079a73ef6871f1538f34fa4e67892e6 Mon Sep 17 00:00:00 2001
ed184b
Message-Id: <00a0afd5e079a73ef6871f1538f34fa4e67892e6.1573552234.git.pmatilai@redhat.com>
ed184b
In-Reply-To: <ce6e8556a8f93327d6de0446f21ac5e549861d82.1573552234.git.pmatilai@redhat.com>
ed184b
References: <ce6e8556a8f93327d6de0446f21ac5e549861d82.1573552234.git.pmatilai@redhat.com>
ed184b
From: Mark Wielaard <mark@klomp.org>
ed184b
Date: Mon, 17 Jun 2019 11:23:26 +0200
ed184b
Subject: [PATCH 3/3] debugedit: Make sure .debug_line old/new idx start equal.
ed184b
ed184b
Found by running the debugedit tests under valgrind.
ed184b
If the old and new .debug_line offset isn't changed then we might
ed184b
write out an uninitialized new_idx.
ed184b
---
ed184b
 tools/debugedit.c | 1 +
ed184b
 1 file changed, 1 insertion(+)
ed184b
ed184b
diff --git a/tools/debugedit.c b/tools/debugedit.c
ed184b
index 84483ef5e..9f8dcd0fb 100644
ed184b
--- a/tools/debugedit.c
ed184b
+++ b/tools/debugedit.c
ed184b
@@ -1177,6 +1177,7 @@ get_line_table (DSO *dso, size_t off, struct line_table **table)
ed184b
   *table = NULL;
ed184b
 
ed184b
   t->old_idx = off;
ed184b
+  t->new_idx = off;
ed184b
   t->size_diff = 0;
ed184b
   t->replace_dirs = false;
ed184b
   t->replace_files = false;
ed184b
-- 
ed184b
2.23.0
ed184b