[Rpm-maint] [PATCH 5/5] debugedit: Make sure .debug_line old/new idx start equal.

Mark Wielaard mark at klomp.org
Mon Jun 17 09:23:26 UTC 2019


Found by running the debugedit tests under valgrind.
If the old and new .debug_line offset isn't changed then we might
write out an uninitialized new_idx.
---
 tools/debugedit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/debugedit.c b/tools/debugedit.c
index 84483ef..9f8dcd0 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -1177,6 +1177,7 @@ get_line_table (DSO *dso, size_t off, struct line_table **table)
   *table = NULL;
 
   t->old_idx = off;
+  t->new_idx = off;
   t->size_diff = 0;
   t->replace_dirs = false;
   t->replace_files = false;
-- 
1.8.3.1



More information about the Rpm-maint mailing list