[packages/abiword] - fix -Wformat-security errors - rel 11

baggins baggins at pld-linux.org
Mon Nov 12 22:57:33 CET 2012


commit f9d03d5848710031956b32606c467f9cbba2530f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Nov 12 22:57:16 2012 +0100

    - fix -Wformat-security errors
    - rel 11

 abiword-format-security.patch | 253 ++++++++++++++++++++++++++++++++++++++++++
 abiword.spec                  |   4 +-
 2 files changed, 256 insertions(+), 1 deletion(-)
---
diff --git a/abiword.spec b/abiword.spec
index a36f7ee..42712ba 100644
--- a/abiword.spec
+++ b/abiword.spec
@@ -15,7 +15,7 @@ Summary:	Multi-platform word processor
 Summary(pl.UTF-8):	Wieloplatformowy procesor tekstu
 Name:		abiword
 Version:	2.8.6
-Release:	10
+Release:	11
 Epoch:		1
 License:	GPL v2+
 Group:		X11/Applications/Editors
@@ -27,6 +27,7 @@ Patch2:		%{name}-libwpd.patch
 Patch3:		%{name}-link.patch
 Patch4:		%{name}-libpng15.patch
 Patch5:		glib.patch
+Patch6:		%{name}-format-security.patch
 URL:		http://www.abisource.com/
 BuildRequires:	aiksaurus-gtk-devel >= 1.2.1
 BuildRequires:	autoconf
@@ -324,6 +325,7 @@ Jest to teczka clipartów używanych przez AbiWorda.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # use generic icon name
 %{__sed} -i -e 's|abiword_48.png|abiword.png|' Makefile.am
diff --git a/abiword-format-security.patch b/abiword-format-security.patch
new file mode 100644
index 0000000..2769297
--- /dev/null
+++ b/abiword-format-security.patch
@@ -0,0 +1,253 @@
+--- abiword-2.8.6/src/af/xap/gtk/xap_UnixDialogHelper.cpp~	2010-02-06 20:34:36.000000000 +0100
++++ abiword-2.8.6/src/af/xap/gtk/xap_UnixDialogHelper.cpp	2012-11-12 22:38:11.229320473 +0100
+@@ -830,7 +830,7 @@
+ 						   GTK_DIALOG_MODAL,
+ 						   GTK_MESSAGE_INFO,
+ 						   GTK_BUTTONS_OK,
+-						   message ) ;
++						   "%s", message ) ;
+ 
+ 	gtk_window_set_title(GTK_WINDOW(msg), "AbiWord");
+ 	gtk_window_set_role(GTK_WINDOW(msg), "message dialog");
+--- abiword-2.8.6/src/af/xap/gtk/xap_UnixDlg_Image.cpp~	2009-06-07 03:36:47.000000000 +0200
++++ abiword-2.8.6/src/af/xap/gtk/xap_UnixDlg_Image.cpp	2012-11-12 22:40:08.589316335 +0100
+@@ -488,7 +488,7 @@
+ 	
+     std::string s;
+ 	pSS->getValueUTF8(XAP_STRING_ID_DLG_Image_Title,s);
+-	abiDialogSetTitle(mMainWindow, s.c_str());
++	abiDialogSetTitle(mMainWindow, "%s", s.c_str());
+ 
+     localizeLabel(GTK_WIDGET(gtk_builder_get_object(builder, "lbDescTab")), pSS, XAP_STRING_ID_DLG_Image_DescTabLabel);
+     localizeLabel(GTK_WIDGET(gtk_builder_get_object(builder, "lbWrapTab")), pSS, XAP_STRING_ID_DLG_Image_WrapTabLabel);
+--- abiword-2.8.6/src/af/xap/gtk/xap_UnixDlg_Zoom.cpp~	2008-08-16 09:13:53.000000000 +0200
++++ abiword-2.8.6/src/af/xap/gtk/xap_UnixDlg_Zoom.cpp	2012-11-12 22:41:17.615980564 +0100
+@@ -225,7 +225,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(XAP_STRING_ID_DLG_Zoom_ZoomTitle,s);
+-	abiDialogSetTitle(window, s.utf8_str());
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 
+ 	// localize the strings in our dialog, and set tags for some widgets
+ 	
+--- abiword-2.8.6/src/af/xap/xp/xap_Prefs.cpp~	2010-02-06 21:50:16.000000000 +0100
++++ abiword-2.8.6/src/af/xap/xp/xap_Prefs.cpp	2012-11-12 22:44:12.825974385 +0100
+@@ -1286,37 +1286,37 @@
+ 	if (XAP_App::s_szBuild_ID && XAP_App::s_szBuild_ID[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_ID          = ");
+-		fprintf(fp,XAP_App::s_szBuild_ID);
++		fprintf(fp,"%s", XAP_App::s_szBuild_ID);
+ 		fprintf(fp," -->\n");
+ 	}
+ 	if (XAP_App::s_szBuild_Version && XAP_App::s_szBuild_Version[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_Version     = ");
+-		fprintf(fp,XAP_App::s_szBuild_Version);
++		fprintf(fp,"%s", XAP_App::s_szBuild_Version);
+ 		fprintf(fp," -->\n");
+ 	}
+ 	if (XAP_App::s_szBuild_Options && XAP_App::s_szBuild_Options[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_Options     = ");
+-		fprintf(fp,XAP_App::s_szBuild_Options);
++		fprintf(fp,"%s", XAP_App::s_szBuild_Options);
+ 		fprintf(fp," -->\n");
+ 	}
+ 	if (XAP_App::s_szBuild_Target && XAP_App::s_szBuild_Target[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_Target      = ");
+-		fprintf(fp,XAP_App::s_szBuild_Target);
++		fprintf(fp,"%s", XAP_App::s_szBuild_Target);
+ 		fprintf(fp," -->\n");
+ 	}
+ 	if (XAP_App::s_szBuild_CompileTime && XAP_App::s_szBuild_CompileTime[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_CompileTime = ");
+-		fprintf(fp,XAP_App::s_szBuild_CompileTime);
++		fprintf(fp,"%s", XAP_App::s_szBuild_CompileTime);
+ 		fprintf(fp," -->\n");
+ 	}
+ 	if (XAP_App::s_szBuild_CompileDate && XAP_App::s_szBuild_CompileDate[0])
+ 	{
+ 		fprintf(fp,"<!--         Build_CompileDate = ");
+-		fprintf(fp,XAP_App::s_szBuild_CompileDate);
++		fprintf(fp,"%s", XAP_App::s_szBuild_CompileDate);
+ 		fprintf(fp," -->\n");
+ 	}
+ #endif
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Annotation.cpp~	2009-08-06 03:35:51.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Annotation.cpp	2012-11-12 22:46:13.629303456 +0100
+@@ -165,7 +165,7 @@
+ 	// set the dialog title
+ 	std::string s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_Annotation_Title,s);
+-	abiDialogSetTitle(window, s.c_str());	
++	abiDialogSetTitle(window, "%s", s.c_str());	
+ 	
+ 	// localize the strings in our dialog, and set some userdata for some widgets
+ 	localizeLabel(GTK_WIDGET(gtk_builder_get_object(builder, "lbTitle")), pSS, AP_STRING_ID_DLG_Annotation_Title_LBL);
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Break.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Break.cpp	2012-11-12 22:46:33.815969411 +0100
+@@ -109,7 +109,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_Break_BreakTitle_Capital,s);
+-	abiDialogSetTitle(window, s.utf8_str());
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 	
+ 	// localize the strings in our dialog, and set tags for some widgets
+ 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Field.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Field.cpp	2012-11-12 22:46:54.355968686 +0100
+@@ -297,7 +297,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_Field_FieldTitle_Capital,s);
+-	abiDialogSetTitle(window, s.utf8_str());	
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 	
+ 	// localize the strings in our dialog, and set some userdata for some widg
+ 
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatFootnotes.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatFootnotes.cpp	2012-11-12 22:47:15.865967928 +0100
+@@ -372,7 +372,7 @@
+ 	// set the dialog title
+     std::string s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_FormatFootnotes_Title,s);
+-	abiDialogSetTitle(window, s.c_str());
++	abiDialogSetTitle(window, "%s", s.c_str());
+ 	
+ 	// localize the strings in our dialog, and set tags for some widgets
+ 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatFrame.cpp~	2009-07-20 18:25:01.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatFrame.cpp	2012-11-12 22:47:39.452633762 +0100
+@@ -476,7 +476,7 @@
+ 	
+ 	// set the dialog title
+ 	ConstructWindowName();
+-	abiDialogSetTitle(window, m_WindowName);
++	abiDialogSetTitle(window, "%s", m_WindowName);
+ 	
+ 	// disable double buffering on our preview
+ 	gtk_widget_set_double_buffered(m_wPreviewArea, FALSE); 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatTable.cpp~	2009-07-30 22:53:31.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatTable.cpp	2012-11-12 22:48:01.205966328 +0100
+@@ -437,7 +437,7 @@
+ 	
+ 	// set the dialog title
+ 	ConstructWindowName();
+-	abiDialogSetTitle(window, m_WindowName);
++	abiDialogSetTitle(window, "%s", m_WindowName);
+ 	
+ 	// disable double buffering on our preview
+ 	gtk_widget_set_double_buffered(m_wPreviewArea, FALSE); 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatTOC.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_FormatTOC.cpp	2012-11-12 22:48:20.275965655 +0100
+@@ -361,7 +361,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_FormatTOC_Title,s);
+-	abiDialogSetTitle(m_windowMain, s.utf8_str());
++	abiDialogSetTitle(m_windowMain, "%s", s.utf8_str());
+ 
+ // localize notebook tabs
+ 	localizeLabel(_getWidget( "lbGeneral"), pSS, AP_STRING_ID_DLG_FormatTOC_General);
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_HdrFtr.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_HdrFtr.cpp	2012-11-12 22:48:41.055964921 +0100
+@@ -203,7 +203,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_HdrFtr_Title,s);
+-	abiDialogSetTitle(window, s.utf8_str());
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 
+ 	// localize the strings in our dialog
+ 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Insert_DateTime.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Insert_DateTime.cpp	2012-11-12 22:49:15.639297036 +0100
+@@ -145,7 +145,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_DateTime_DateTimeTitle,s);
+-	abiDialogSetTitle(window, s.utf8_str());
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 	
+ 	// localize the strings in our dialog
+ 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_InsertTable.cpp~	2009-06-03 04:38:41.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_InsertTable.cpp	2012-11-12 22:50:14.005961642 +0100
+@@ -127,7 +127,7 @@
+ 	// set the dialog title
+     std::string s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_InsertTable_TableTitle,s);
+-	abiDialogSetTitle(window, s.c_str());
++	abiDialogSetTitle(window, "%s", s.c_str());
+ 	// Units
+ 	gtk_label_set_text (GTK_LABEL (GTK_WIDGET(gtk_builder_get_object(builder, "lbInch"))), UT_dimensionName(m_dim));
+ 	double spinstep = getSpinIncr ();
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_MailMerge.cpp~	2008-11-22 18:47:06.000000000 +0100
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_MailMerge.cpp	2012-11-12 22:50:32.412627659 +0100
+@@ -173,7 +173,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_MailMerge_MailMergeTitle,s);
+-	abiDialogSetTitle(m_windowMain, s.utf8_str());
++	abiDialogSetTitle(m_windowMain, "%s", s.utf8_str());
+ 	
+ 	// localize the strings in our dialog, and set tags for some widgets
+ 	
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_MetaData.cpp~	2008-08-16 09:13:53.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_MetaData.cpp	2012-11-12 22:51:13.505959544 +0100
+@@ -155,7 +155,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_MetaData_Title,s);
+-	abiDialogSetTitle(window, s.utf8_str());	
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 	
+ 	// localize the strings in our dialog, and set some userdata for some widgets
+ 	localizeLabel(GTK_WIDGET(gtk_builder_get_object(builder, "lbTitle")), pSS, AP_STRING_ID_DLG_MetaData_Title_LBL);
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Options.cpp~	2009-07-03 19:17:25.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Options.cpp	2012-11-12 22:51:45.839291734 +0100
+@@ -208,7 +208,7 @@
+ 
+     dlg = WID ( "ap_UnixDialog_Options_ColorSel" );
+     pSS->getValueUTF8 ( AP_STRING_ID_DLG_Options_Label_ChooseForTransparent, s );
+-    abiDialogSetTitle ( dlg, s.utf8_str() );
++    abiDialogSetTitle ( dlg, "%s", s.utf8_str() );
+ 
+     colorsel = WID ( "csColorSel" );
+ 
+@@ -529,7 +529,7 @@
+     // set the dialog title
+     std::string s;
+     pSS->getValueUTF8(AP_STRING_ID_DLG_Options_OptionsTitle, s);
+-    abiDialogSetTitle(mainWindow, s.c_str());
++    abiDialogSetTitle(mainWindow, "%s", s.c_str());
+ 
+     // the control buttons
+     g_signal_connect ( G_OBJECT ( m_buttonDefaults ),
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_PageNumbers.cpp~	2009-06-03 09:31:03.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_PageNumbers.cpp	2012-11-12 22:52:01.915957837 +0100
+@@ -172,7 +172,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_PageNumbers_Title,s);
+-	abiDialogSetTitle(window, s.utf8_str());
++	abiDialogSetTitle(window, "%s", s.utf8_str());
+ 
+ 	// disable double buffering on our preview
+ 	gtk_widget_set_double_buffered(m_previewArea, FALSE);  
+--- abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Stylist.cpp~	2009-06-01 07:25:31.000000000 +0200
++++ abiword-2.8.6/src/wp/ap/gtk/ap_UnixDialog_Stylist.cpp	2012-11-12 22:52:25.832623658 +0100
+@@ -274,7 +274,7 @@
+ 	// set the dialog title
+ 	UT_UTF8String s;
+ 	pSS->getValueUTF8(AP_STRING_ID_DLG_Stylist_Title,s);
+-	abiDialogSetTitle(m_windowMain, s.utf8_str());
++	abiDialogSetTitle(m_windowMain, "%s", s.utf8_str());
+ 
+ 	g_object_unref(G_OBJECT(builder));
+ 	
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/abiword.git/commitdiff/f9d03d5848710031956b32606c467f9cbba2530f



More information about the pld-cvs-commit mailing list