summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/makedevs
diff options
context:
space:
mode:
authorEdwin Plauchu <edwin.plauchu.camacho@intel.com>2016-05-17 14:26:16 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 09:01:01 +0100
commitf6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14 (patch)
tree92e55d1d37065b0e9527068422e2656fc8c14acc /meta/recipes-devtools/makedevs
parentf63a36360b7e138d2a63c84b5b1a8287ffe3d2ae (diff)
downloadopenembedded-core-f6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14.tar.gz
openembedded-core-f6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14.tar.bz2
openembedded-core-f6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14.zip
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] Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/makedevs')
-rw-r--r--meta/recipes-devtools/makedevs/makedevs/makedevs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index 771f33ef5a..7471f3f5b3 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);
}