[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4600/8267] console-tools: fix string formatting issue
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4600/8267] console-tools: fix string formatting issue
- Date: Sun, 17 Dec 2017 02:15:51 +0000 (UTC)
commit 1766594cece9c3f1055268b05bc335a0e769c4c4
Author: Chen Qi <Qi Chen windriver com>
Date: Wed Feb 8 17:25:36 2017 +0800
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>
...001-Fix-format-security-compilation-error.patch | 57 ++++++++++++++++++++
.../console-tools/console-tools_0.3.2.bb | 1 +
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 0000000..6e72ec6
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch
@@ -0,0 +1,57 @@
+Subject: Fix 'format-security' compilation error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi Chen windriver com>
+---
+ kbdtools/kbd_mode.c | 6 +++---
+ kbdtools/setmetamode.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/kbdtools/kbd_mode.c b/kbdtools/kbd_mode.c
+index 02dca38..8dbcd39 100644
+--- a/kbdtools/kbd_mode.c
++++ b/kbdtools/kbd_mode.c
+@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
+ /* report mode */
+ if (ioctl(fd, KDGKBMODE, &mode))
+ {
+- fprintf(stderr, progname);
++ fprintf(stderr, "%s", progname);
+ perror(_(": error reading keyboard mode\n"));
+ exit(1);
+ }
+@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
+ kbd_rep.period = rate;
+ if (ioctl(fd, KDKBDREP, &kbd_rep))
+ {
+- fprintf(stderr, progname);
++ fprintf(stderr, "%s", progname);
+ perror(_(": error setting keyboard repeat mode\n"));
+ exit(1);
+ }
+@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
+
+ if (ioctl(fd, KDSKBMODE, mode))
+ {
+- fprintf(stderr, progname);
++ fprintf(stderr, "%s", progname);
+ perror(_(": error setting keyboard mode\n"));
+ exit(1);
+ }
+diff --git a/kbdtools/setmetamode.c b/kbdtools/setmetamode.c
+index 5bed945..0ba7676 100644
+--- a/kbdtools/setmetamode.c
++++ b/kbdtools/setmetamode.c
+@@ -42,7 +42,7 @@ void report(int meta)
+ default:
+ s = N_("Strange mode for Meta key?\n");
+ }
+- printf(_(s));
++ printf("%s", _(s));
+ }
+
+ struct meta
+--
+2.8.3
+
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 1db8414..286c2a4 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 \
file://no-dep-on-libfl.patch \
file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
file://0001-Cover-the-else-with-__GLIBC__.patch \
+ file://0001-Fix-format-security-compilation-error.patch \
file://lcmessage.m4 \
file://Makevars"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]