diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff index fe55c69..dce77f9 100644 --- a/debugedit-comp-dir.diff +++ b/debugedit-comp-dir.diff @@ -1,7 +1,7 @@ Include compilation directory in source file list if used. ---- ./tools/debugedit.c.orig 2017-01-19 12:56:26.948739541 +0000 -+++ ./tools/debugedit.c 2017-01-19 12:56:33.876719778 +0000 +--- ./tools/debugedit.c.orig 2017-03-01 12:51:20.851951816 +0000 ++++ ./tools/debugedit.c 2017-03-01 12:54:14.020391379 +0000 @@ -512,6 +512,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off uint32_t value, dirt_cnt; size_t comp_dir_len = !comp_dir ? 0 : strlen (comp_dir); @@ -10,14 +10,14 @@ Include compilation directory in source file list if used. if (phase != 0) return 0; -@@ -624,6 +625,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -620,6 +621,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off + memcpy (s, comp_dir, comp_dir_len); + s[comp_dir_len] = '/'; + p += comp_dir_len + 1; ++ comp_dir_used = 1; + } memcpy (p, dirt[value], dir_len); p[dir_len] = '/'; - memcpy (p + dir_len + 1, file, file_len + 1); -+ comp_dir_used = 1; - } - canonicalize_path (s, s); - if (list_file_fd != -1) @@ -657,6 +659,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off } ++ptr; diff --git a/rpm.changes b/rpm.changes index 739e4da..d7fef1e 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,8 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 1 13:55:51 CET 2017 - mls@suse.de + +- Tweak debugedit-comp-dir patch so that debugedit does not crash + with a NULL comp_dir [bnc#1027228] + ------------------------------------------------------------------- Mon Feb 27 13:24:26 UTC 2017 - rguenther@suse.com -- Fix debugedit-canon-fix.diff to handle directory table size shrinking - by 1 byte correctly. +- Fix debugedit-canon-fix.diff to handle directory table size + shrinking by 1 byte correctly. ------------------------------------------------------------------- Mon Feb 20 14:17:26 CET 2017 - mls@suse.de