Igor Gnatenko 082d5d
From 8e74618100580a1370b9045296c4d2d37340735f Mon Sep 17 00:00:00 2001
Igor Gnatenko 082d5d
From: Mark Wielaard <mark@klomp.org>
Igor Gnatenko 082d5d
Date: Thu, 16 Mar 2017 22:53:54 +0100
Igor Gnatenko 082d5d
Subject: [PATCH 20/49] debugedit: Fix edit_dwarf2_line replace_dirs ->
Igor Gnatenko 082d5d
 replace_files typo.
Igor Gnatenko 082d5d
Igor Gnatenko 082d5d
We wouldn't replace the changed file names if replace_dirs was false,
Igor Gnatenko 082d5d
but replace_files was true. This could overrun the new debug_line data
Igor Gnatenko 082d5d
buffer if the original file name was larger than the replacement. It
Igor Gnatenko 082d5d
wasn't found before because often when we need to replace files we
Igor Gnatenko 082d5d
also would have to replace dirs.
Igor Gnatenko 082d5d
Igor Gnatenko 082d5d
This fixes the kubernetes build in fedora.
Igor Gnatenko 082d5d
Igor Gnatenko 082d5d
Signed-off-by: Mark Wielaard <mark@klomp.org>
Igor Gnatenko 082d5d
Igor Gnatenko 082d5d
(cherry picked from commit dc759bc655ff1c18a08d77dd31dedfe3ae1025b0)
Igor Gnatenko 082d5d
---
Igor Gnatenko 082d5d
 tools/debugedit.c | 2 +-
Igor Gnatenko 082d5d
 1 file changed, 1 insertion(+), 1 deletion(-)
Igor Gnatenko 082d5d
Mark Wielaard 03607f
diff --git a/tools/debugedit.c b/tools/debugedit.c
Igor Gnatenko 082d5d
index 4798c6370..87a423fdb 100644
Mark Wielaard 03607f
--- a/tools/debugedit.c
Mark Wielaard 03607f
+++ b/tools/debugedit.c
Mark Wielaard 03607f
@@ -1185,7 +1185,7 @@ edit_dwarf2_line (DSO *dso)
Mark Wielaard 03607f
 	    {
Mark Wielaard 03607f
 	      const char *file = (const char *) optr;
Mark Wielaard 03607f
 	      const char *file_path = NULL;
Mark Wielaard 03607f
-	      if (t->replace_dirs)
Mark Wielaard 03607f
+	      if (t->replace_files)
Mark Wielaard 03607f
 		{
Mark Wielaard 03607f
 		  file_path = skip_dir_prefix (file, base_dir);
Mark Wielaard 03607f
 		  if (file_path != NULL)
Igor Gnatenko 082d5d
-- 
Igor Gnatenko 082d5d
2.13.2
Igor Gnatenko 082d5d