diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-30 11:26:23 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-04-06 13:00:09 +0200 |
commit | 2ae91ddd68e1b621873baa319eaa05080719dfd1 (patch) | |
tree | b7e9011c50febb09e2365784e98b4a5acf463715 /meta-xfce/recipes-apps | |
parent | bc4d1aa833f62e1bc270eaed99dfd50c0f7abe3a (diff) | |
download | meta-openembedded-2ae91ddd68e1b621873baa319eaa05080719dfd1.tar.gz |
xarchiver: Fix build with security flags turned on
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-xfce/recipes-apps')
-rw-r--r-- | meta-xfce/recipes-apps/xarchiver/xarchiver/0001-Add-proper-formatting-string-to-printf-like-function.patch | 40 | ||||
-rw-r--r-- | meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb | 4 |
2 files changed, 43 insertions, 1 deletions
diff --git a/meta-xfce/recipes-apps/xarchiver/xarchiver/0001-Add-proper-formatting-string-to-printf-like-function.patch b/meta-xfce/recipes-apps/xarchiver/xarchiver/0001-Add-proper-formatting-string-to-printf-like-function.patch new file mode 100644 index 000000000..a1158831a --- /dev/null +++ b/meta-xfce/recipes-apps/xarchiver/xarchiver/0001-Add-proper-formatting-string-to-printf-like-function.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From baf93ea9acf845c5455d577ac19a6f680dac3d2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 30 Mar 2017 11:22:42 -0700 | ||
4 | Subject: [PATCH] Add proper formatting string to printf-like functions | ||
5 | |||
6 | Avoids potential security holes and makes compiler happy | ||
7 | |||
8 | | ../../../../../../../workspace/sources/xarchiver/src/window.c:236:72: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] | ||
9 | | gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),message2); | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/window.c | 6 +++--- | ||
14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | Index: git/src/window.c | ||
17 | =================================================================== | ||
18 | --- git.orig/src/window.c | ||
19 | +++ git/src/window.c | ||
20 | @@ -231,9 +231,9 @@ int xa_show_message_dialog (GtkWindow *w | ||
21 | { | ||
22 | int response; | ||
23 | |||
24 | - dialog = gtk_message_dialog_new (window,mode,type,button,message1); | ||
25 | + dialog = gtk_message_dialog_new (window,mode,type,button,"%s",message1); | ||
26 | gtk_dialog_set_default_response (GTK_DIALOG (dialog),GTK_RESPONSE_NO); | ||
27 | - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),message2); | ||
28 | + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),"%s",message2); | ||
29 | response = gtk_dialog_run (GTK_DIALOG (dialog)); | ||
30 | gtk_widget_destroy (GTK_WIDGET (dialog)); | ||
31 | return response; | ||
32 | @@ -511,7 +511,7 @@ void xa_list_archive (GtkMenuItem *menui | ||
33 | g_fprintf (stream,_("Comment:\n")); | ||
34 | if (bp) | ||
35 | g_fprintf(stream,"</b><pre>"); | ||
36 | - g_fprintf (stream,archive[idx]->comment->str); | ||
37 | + g_fprintf (stream,"%s",archive[idx]->comment->str); | ||
38 | if (bp) | ||
39 | g_fprintf(stream,"</pre>"); | ||
40 | g_fprintf (stream,"\n"); | ||
diff --git a/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb b/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb index ca299223d..ea34a52c1 100644 --- a/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb +++ b/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb | |||
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
7 | 7 | ||
8 | DEPENDS = "gtk+ glib-2.0 xfce4-dev-tools-native intltool-native" | 8 | DEPENDS = "gtk+ glib-2.0 xfce4-dev-tools-native intltool-native" |
9 | 9 | ||
10 | SRC_URI = "git://github.com/schnitzeltony/xarchiver.git;branch=master" | 10 | SRC_URI = "git://github.com/schnitzeltony/xarchiver.git;branch=master \ |
11 | file://0001-Add-proper-formatting-string-to-printf-like-function.patch \ | ||
12 | " | ||
11 | SRCREV = "e80e90528c9aab2fe36d9078b945b44c05cc20d3" | 13 | SRCREV = "e80e90528c9aab2fe36d9078b945b44c05cc20d3" |
12 | PV = "0.5.3" | 14 | PV = "0.5.3" |
13 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |