Here's a patch. After applying this I see the build complete
successfully on sid. The patch is simple. Each failure was complaining
about something like this:

  string xxx;
  printf(xxx.c_str());

The attached patch changes each failing instance to

  string xxx;
  printf("%s", xxx.c_str());


diff --git a/userspace/libsinsp/cursescomponents.cpp b/userspace/libsinsp/cursescomponents.cpp
index 4003cb4e..9a9138d4 100644
--- a/userspace/libsinsp/cursescomponents.cpp
+++ b/userspace/libsinsp/cursescomponents.cpp
@@ -877,6 +877,7 @@ void curses_textbox::print_no_data()
 	string wstr = "No Data For This Selection";
 	mvprintw(m_parent->m_screenh / 2,
 		m_parent->m_screenw / 2 - wstr.size() / 2,
+                "%s",
 		wstr.c_str());
 
 	refresh();
@@ -1100,6 +1101,7 @@ void curses_textbox::render()
 		attrset(m_parent->m_colors[sinsp_cursesui::LARGE_NUMBER]);
 		mvprintw(0,
 			m_parent->m_screenw / 2 - wstr.size() / 2,
+                        "%s",
 			wstr.c_str());
 	}
 
diff --git a/userspace/libsinsp/cursesspectro.cpp b/userspace/libsinsp/cursesspectro.cpp
index 6858bc95..fddc09cf 100644
--- a/userspace/libsinsp/cursesspectro.cpp
+++ b/userspace/libsinsp/cursesspectro.cpp
@@ -227,6 +227,7 @@ void curses_spectro::print_error(string wstr)
 	mvwprintw(m_tblwin, 
 		m_parent->m_screenh / 2,
 		m_parent->m_screenw / 2 - wstr.size() / 2, 
+                "%s",
 		wstr.c_str());	
 }
 
diff --git a/userspace/libsinsp/cursestable.cpp b/userspace/libsinsp/cursestable.cpp
index 69c2aa32..6fef5a4c 100644
--- a/userspace/libsinsp/cursestable.cpp
+++ b/userspace/libsinsp/cursestable.cpp
@@ -254,6 +254,7 @@ void curses_table::print_line_centered(string line, int32_t off)
 		mvwprintw(m_tblwin, 
 			m_parent->m_screenh / 2 + off,
 			m_parent->m_screenw / 2 - line.size() / 2, 
+                        "%s",
 			line.c_str());
 	}
 	else
@@ -268,6 +269,7 @@ glogf("2, %d %s\n", spos, ss.c_str());
 			mvwprintw(m_tblwin, 
 				m_parent->m_screenh / 2 + off + j,
 				0,
+                                "%s",
 				ss.c_str());
 
 			spos += m_parent->m_screenw;
@@ -328,6 +330,7 @@ void curses_table::print_error(string wstr)
 	mvwprintw(m_tblwin, 
 		m_parent->m_screenh / 2,
 		m_parent->m_screenw / 2 - wstr.size() / 2, 
+                "%s",
 		wstr.c_str());	
 }
 
diff --git a/userspace/libsinsp/cursesui.cpp b/userspace/libsinsp/cursesui.cpp
index 1eeb0864..2427e54d 100644
--- a/userspace/libsinsp/cursesui.cpp
+++ b/userspace/libsinsp/cursesui.cpp
@@ -825,6 +825,7 @@ void sinsp_cursesui::render_header()
 		attrset(m_colors[sinsp_cursesui::LARGE_NUMBER]);
 		mvprintw(0,
 			m_screenw / 2 - wstr.size() / 2, 
+                        "%s",
 			wstr.c_str());	
 	}
 
@@ -1123,7 +1124,7 @@ void sinsp_cursesui::render_filtersearch_main_menu()
 
 		m_cursor_pos = cursor_pos;
 
-		mvprintw(m_screenh - 1, m_cursor_pos, str->c_str());
+		mvprintw(m_screenh - 1, m_cursor_pos, "%s", str->c_str());
 
 		m_cursor_pos += str->size();
 	}
@@ -2189,6 +2190,7 @@ void sinsp_cursesui::print_progress(double progress)
 	string wstr = "Processing File";
 	mvprintw(m_screenh / 2,
 		m_screenw / 2 - wstr.size() / 2, 
+                "%s",
 		wstr.c_str());	
 
 	//
@@ -2199,6 +2201,7 @@ void sinsp_cursesui::print_progress(double progress)
 	wstr = "Progress: " + string(numbuf);
 	mvprintw(m_screenh / 2 + 1,
 		m_screenw / 2 - wstr.size() / 2, 
+                "%s",
 		wstr.c_str());
 
 	refresh();
@@ -2308,6 +2311,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
 						attrset(m_colors[sinsp_cursesui::FAILED_SEARCH]);
 						mvprintw(m_screenh / 2,
 							m_screenw / 2 - wstr.size() / 2, 
+                                                        "%s",
 							wstr.c_str());	
 
 						//
@@ -2363,6 +2367,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
 
 					mvprintw(m_screenh / 2,
 						m_screenw / 2 - wstr.size() / 2, 
+                                                "%s",
 						wstr.c_str());
 
 					render();
@@ -2436,6 +2441,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
 
 				mvprintw(m_screenh / 2,
 					m_screenw / 2 - wstr.size() / 2, 
+                                        "%s",
 					wstr.c_str());
 
 				render();

Reply via email to