[Commits] archiver_gtk.c 1.1.2.30 1.1.2.31 libarchive_archive.c 1.1.2.18 1.1.2.19

mones at claws-mail.org mones at claws-mail.org
Thu Jul 12 08:45:19 CEST 2012


Update of /home/claws-mail/plugins/archive/src
In directory srv:/tmp/cvs-serv18971/src

Modified Files:
      Tag: gtk2
	archiver_gtk.c libarchive_archive.c 
Log Message:
2012-07-12 [mones]	0.6.12cvs2

	* src/archiver_gtk.c
	* src/libarchive_archive.c
		Fix "format not a string literal and no format arguments"
		when building with -Werror=format-security (hardened builds) 

Index: archiver_gtk.c
===================================================================
RCS file: /home/claws-mail/plugins/archive/src/Attic/archiver_gtk.c,v
retrieving revision 1.1.2.30
retrieving revision 1.1.2.31
diff -u -d -r1.1.2.30 -r1.1.2.31
--- archiver_gtk.c	31 Oct 2011 01:38:54 -0000	1.1.2.30
+++ archiver_gtk.c	12 Jul 2012 06:45:16 -0000	1.1.2.31
@@ -531,7 +531,7 @@
 			GTK_DIALOG_DESTROY_WITH_PARENT,
 			GTK_MESSAGE_WARNING,
 			GTK_BUTTONS_OK_CANCEL,
-			msg);
+			"%s", msg);
 		response = gtk_dialog_run(GTK_DIALOG (dialog));
 		gtk_widget_destroy(dialog);
                 g_free(msg);
@@ -545,7 +545,7 @@
 			GTK_DIALOG_DESTROY_WITH_PARENT,
 			GTK_MESSAGE_ERROR,
 			GTK_BUTTONS_OK,
-			msg);
+			"%s", msg);
 		response = gtk_dialog_run(GTK_DIALOG (dialog));
 		gtk_widget_destroy(dialog);
                 g_free(msg);

Index: libarchive_archive.c
===================================================================
RCS file: /home/claws-mail/plugins/archive/src/Attic/libarchive_archive.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -u -d -r1.1.2.18 -r1.1.2.19
--- libarchive_archive.c	6 Mar 2009 15:40:39 -0000	1.1.2.18
+++ libarchive_archive.c	12 Jul 2012 06:45:16 -0000	1.1.2.19
@@ -366,7 +366,7 @@
 #endif
 	filename = g_strrstr_len(path, strlen(path), "/");
 	if (! filename)
-		g_warning(path);
+		g_warning("%s\n", path);
 	g_return_if_fail(filename != NULL);
 
 	filename++;
@@ -398,7 +398,7 @@
 				in, archive_name, READ_BLOCK_SIZE)) != ARCHIVE_OK) {
 				buf = g_strdup_printf(
 						"%s: %s\n", archive_name, archive_error_string(in));
-				g_warning(buf);
+				g_warning("%s\n", buf);
 				g_free(buf);
 				result = archive_error_string(in);
 			}
@@ -413,7 +413,7 @@
 						if (res != ARCHIVE_OK) {
 							buf = g_strdup_printf("%s\n", 
 											archive_error_string(out));
-							g_warning(buf);
+							g_warning("%s\n", buf);
 							g_free(buf);
 							/* skip this file an continue */
 							res = ARCHIVE_OK;
@@ -423,7 +423,7 @@
 							if (res != ARCHIVE_OK) {
 								buf = g_strdup_printf("%s\n", 
 												archive_error_string(in));
-								g_warning(buf);
+								g_warning("%s\n", buf);
 								g_free(buf);
 								/* skip this file an continue */
 								res = ARCHIVE_OK;
@@ -440,7 +440,7 @@
 							g_free(buf);
 							buf = g_strdup_printf("%s: Unknown error\n", archive_name);
 						}
-						g_warning(buf);
+						g_warning("%s\n", buf);
 						g_free(buf);
 						result = archive_error_string(in);
 					}
@@ -537,7 +537,7 @@
 			buf = NULL;
 			buf = g_strdup_printf(
 						"%s: Not dumping to %s", archive_name, filename);
-			g_warning(buf);
+			g_warning("%s\n", buf);
 #ifndef _TEST
 			debug_print("%s\n", buf);
 #endif



More information about the Commits mailing list