aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-gnome/libunique/libunique/0001-test-unique-Add-format-qualifier-s-for-string.patch
blob: 7f9fdf397149a1817f2fdb6c837a634ab284a2c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 37632aca00d48c53e91f08bc7435c721ba81b2cd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 30 Mar 2017 14:32:55 -0700
Subject: [PATCH] test-unique: Add format qualifier %s for string

Fixes potential security issues that compiler flags

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 tests/test-unique.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test-unique.c b/tests/test-unique.c
index b7cde45..82ee81b 100644
--- a/tests/test-unique.c
+++ b/tests/test-unique.c
@@ -82,10 +82,10 @@ app_message_cb (UniqueApp         *app,
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_INFO,
                                    GTK_BUTTONS_CLOSE,
-                                   title);
+                                   "%s",title);
   if (message)
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                              message);
+                                              "%s",message);
 
   gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
 
-- 
2.12.1