blob: 27b890e22bfc1a9d7acffed53f2219d9e86c860c [file] [log] [blame]
Andrew Geissler1e34c2d2020-05-29 16:02:59 -05001From adb9587466a493fdd9d4410f1b8b130ebca06daa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 19 May 2020 22:21:23 -0700
4Subject: [PATCH] ptrace01: Fix missing format string
5
6Fixes
7| ptrace01.c:89:2: error: format string is not a string literal
8(potentially insecure) [-Werror,-Wformat-security]
9| tst_res(TINFO, tc->message);
10| ^ ~~~~~~~~~~~
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13Upstream-Status: Backport [58424835952641f4fd60c0ae3ab6c64decca3f8a]
14---
15 testcases/kernel/syscalls/ptrace/ptrace01.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/testcases/kernel/syscalls/ptrace/ptrace01.c b/testcases/kernel/syscalls/ptrace/ptrace01.c
19index 87a99e4150..9071bbabaf 100644
20--- a/testcases/kernel/syscalls/ptrace/ptrace01.c
21+++ b/testcases/kernel/syscalls/ptrace/ptrace01.c
22@@ -86,7 +86,7 @@ static void run(unsigned int i)
23
24 got_signal = 0;
25
26- tst_res(TINFO, tc->message);
27+ tst_res(TINFO, "%s", tc->message);
28
29 if (tc->handler == 1) {
30 parent_act.sa_handler = parent_handler;
31--
322.26.2
33