[gnome-continuous-yocto/gnomeostree-3.28-rocko: 390/8267] makedevs: fix security issues
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 390/8267] makedevs: fix security issues
- Date: Sat, 16 Dec 2017 20:21:35 +0000 (UTC)
commit b00282fd20f711033d40993a6d86fdac97e8a3a3
Author: Edwin Plauchu <edwin plauchu camacho intel com>
Date: Tue May 17 14:26:16 2016 -0500
makedevs: fix security issues
This avoids makedevs failure to compile with compiler flags
which elevate common string formatting issues into an error
(-Wformat -Wformat-security -Werror=format-security).
[YOCTO #9549]
(From OE-Core rev: f6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14)
Signed-off-by: Edwin Plauchu <edwin plauchu camacho intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/conf/distro/include/security_flags.inc | 1 -
meta/recipes-devtools/makedevs/makedevs/makedevs.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index c1f596e..febedfa 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -103,7 +103,6 @@ SECURITY_STRINGFORMAT_pn-expect = ""
SECURITY_STRINGFORMAT_pn-gcc = ""
SECURITY_STRINGFORMAT_pn-gettext = ""
SECURITY_STRINGFORMAT_pn-kexec-tools = ""
-SECURITY_STRINGFORMAT_pn-makedevs = ""
SECURITY_STRINGFORMAT_pn-oh-puzzles = ""
SECURITY_STRINGFORMAT_pn-unzip = ""
diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index 771f33e..7471f3f 100644
--- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -510,7 +510,7 @@ int main(int argc, char **argv)
umask (0);
if (argc==1) {
- fprintf(stderr, helptext);
+ fputs( helptext , stderr );
exit(1);
}
@@ -525,7 +525,7 @@ int main(int argc, char **argv)
error_msg_and_die("%s: not a proper device table file", optarg);
break;
case 'h':
- printf(helptext);
+ puts(helptext);
exit(0);
case 'r':
case 'd': /* for compatibility with mkfs.jffs, genext2fs,
etc... */
@@ -553,13 +553,13 @@ int main(int argc, char **argv)
printf("%s: %s\n", app_name, VERSION);
exit(0);
default:
- fprintf(stderr, helptext);
+ fputs(helptext,stderr);
exit(1);
}
}
if (argv[optind] != NULL) {
- fprintf(stderr, helptext);
+ fputs(helptext,stderr);
exit(1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]