From: Mark Wielaard <m...@klomp.org>

We wouldn't replace the changed file names if replace_dirs was false,
but replace_files was true. This could overrun the new debug_line data
buffer if the original file name was larger than the replacement. It
wasn't found before because often when we need to replace files we
also would have to replace dirs.

This fixes the kubernetes build in fedora.

Signed-off-by: Mark Wielaard <m...@klomp.org>
---
 tools/debugedit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/debugedit.c b/tools/debugedit.c
index 4798c63..87a423f 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -1185,7 +1185,7 @@ edit_dwarf2_line (DSO *dso)
            {
              const char *file = (const char *) optr;
              const char *file_path = NULL;
-             if (t->replace_dirs)
+             if (t->replace_files)
                {
                  file_path = skip_dir_prefix (file, base_dir);
                  if (file_path != NULL)
-- 
1.8.3.1

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to