summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-02-08 17:25:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 20:06:42 -0800
commit1766594cece9c3f1055268b05bc335a0e769c4c4 (patch)
treed81eae387861a9c5bd2a80b8540ed5fa27d369cf /meta
parent9872c3d2ae80933c89ac59cbe83203bb0671f603 (diff)
downloadpoky-1766594cece9c3f1055268b05bc335a0e769c4c4.tar.gz
console-tools: fix string formatting issue
Fix string formatting issue in console-tools. Otherwise, when compiling with '-Wformat -Wformat-security -Werror=format-security', we would have compilation error. [YOCTO #9540] (From OE-Core rev: bee65a820842c233e74502ee2af0a6223c60b45f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch57
-rw-r--r--meta/recipes-core/console-tools/console-tools_0.3.2.bb1
2 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch
new file mode 100644
index 0000000000..6e72ec665b
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch
@@ -0,0 +1,57 @@
1Subject: Fix 'format-security' compilation error.
2
3Upstream-Status: Pending
4
5Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
6---
7 kbdtools/kbd_mode.c | 6 +++---
8 kbdtools/setmetamode.c | 2 +-
9 2 files changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/kbdtools/kbd_mode.c b/kbdtools/kbd_mode.c
12index 02dca38..8dbcd39 100644
13--- a/kbdtools/kbd_mode.c
14+++ b/kbdtools/kbd_mode.c
15@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
16 /* report mode */
17 if (ioctl(fd, KDGKBMODE, &mode))
18 {
19- fprintf(stderr, progname);
20+ fprintf(stderr, "%s", progname);
21 perror(_(": error reading keyboard mode\n"));
22 exit(1);
23 }
24@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
25 kbd_rep.period = rate;
26 if (ioctl(fd, KDKBDREP, &kbd_rep))
27 {
28- fprintf(stderr, progname);
29+ fprintf(stderr, "%s", progname);
30 perror(_(": error setting keyboard repeat mode\n"));
31 exit(1);
32 }
33@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
34
35 if (ioctl(fd, KDSKBMODE, mode))
36 {
37- fprintf(stderr, progname);
38+ fprintf(stderr, "%s", progname);
39 perror(_(": error setting keyboard mode\n"));
40 exit(1);
41 }
42diff --git a/kbdtools/setmetamode.c b/kbdtools/setmetamode.c
43index 5bed945..0ba7676 100644
44--- a/kbdtools/setmetamode.c
45+++ b/kbdtools/setmetamode.c
46@@ -42,7 +42,7 @@ void report(int meta)
47 default:
48 s = N_("Strange mode for Meta key?\n");
49 }
50- printf(_(s));
51+ printf("%s", _(s));
52 }
53
54 struct meta
55--
562.8.3
57
diff --git a/meta/recipes-core/console-tools/console-tools_0.3.2.bb b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
index 1db8414cb2..286c2a4753 100644
--- a/meta/recipes-core/console-tools/console-tools_0.3.2.bb
+++ b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
16 file://no-dep-on-libfl.patch \ 16 file://no-dep-on-libfl.patch \
17 file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \ 17 file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
18 file://0001-Cover-the-else-with-__GLIBC__.patch \ 18 file://0001-Cover-the-else-with-__GLIBC__.patch \
19 file://0001-Fix-format-security-compilation-error.patch \
19 file://lcmessage.m4 \ 20 file://lcmessage.m4 \
20 file://Makevars" 21 file://Makevars"
21 22