diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-05-19 22:26:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-21 10:52:07 +0100 |
commit | 1db1ef6721d0da4501e82fd31923f9216144d386 (patch) | |
tree | 4107eb4edee6677e339238ed4a7a25a9b35c7441 /meta/recipes-extended/ltp/ltp | |
parent | 82346d35e4a879ae13678dc28ffa354ea68b2ac0 (diff) | |
download | poky-1db1ef6721d0da4501e82fd31923f9216144d386.tar.gz |
ltp: Fix format security warnings with gcc10
(From OE-Core rev: 3be441f12c790cefb0e2f7e9c88a920f03787719)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Petr Vorel <petr.vorel@gmail.com>
Cc: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp/ltp')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch b/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch new file mode 100644 index 0000000000..27b890e22b --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From adb9587466a493fdd9d4410f1b8b130ebca06daa Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 19 May 2020 22:21:23 -0700 | ||
4 | Subject: [PATCH] ptrace01: Fix missing format string | ||
5 | |||
6 | Fixes | ||
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 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | Upstream-Status: Backport [58424835952641f4fd60c0ae3ab6c64decca3f8a] | ||
14 | --- | ||
15 | testcases/kernel/syscalls/ptrace/ptrace01.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/testcases/kernel/syscalls/ptrace/ptrace01.c b/testcases/kernel/syscalls/ptrace/ptrace01.c | ||
19 | index 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 | -- | ||
32 | 2.26.2 | ||
33 | |||