diff options
author | Edwin Plauchu <edwin.plauchu.camacho@intel.com> | 2016-05-17 14:26:16 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-19 09:05:20 +0100 |
commit | b00282fd20f711033d40993a6d86fdac97e8a3a3 (patch) | |
tree | 302b6e9d0ed1ceb67ee59249b7027fa6ec85ebaf /meta/recipes-devtools/makedevs | |
parent | c676d5dd6f276c1404c7ae19e9522b603fcd8b99 (diff) | |
download | poky-b00282fd20f711033d40993a6d86fdac97e8a3a3.tar.gz |
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>
Diffstat (limited to 'meta/recipes-devtools/makedevs')
-rw-r--r-- | meta/recipes-devtools/makedevs/makedevs/makedevs.c | 8 |
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) | |||
510 | umask (0); | 510 | umask (0); |
511 | 511 | ||
512 | if (argc==1) { | 512 | if (argc==1) { |
513 | fprintf(stderr, helptext); | 513 | fputs( helptext , stderr ); |
514 | exit(1); | 514 | exit(1); |
515 | } | 515 | } |
516 | 516 | ||
@@ -525,7 +525,7 @@ int main(int argc, char **argv) | |||
525 | error_msg_and_die("%s: not a proper device table file", optarg); | 525 | error_msg_and_die("%s: not a proper device table file", optarg); |
526 | break; | 526 | break; |
527 | case 'h': | 527 | case 'h': |
528 | printf(helptext); | 528 | puts(helptext); |
529 | exit(0); | 529 | exit(0); |
530 | case 'r': | 530 | case 'r': |
531 | case 'd': /* for compatibility with mkfs.jffs, genext2fs, etc... */ | 531 | case 'd': /* for compatibility with mkfs.jffs, genext2fs, etc... */ |
@@ -553,13 +553,13 @@ int main(int argc, char **argv) | |||
553 | printf("%s: %s\n", app_name, VERSION); | 553 | printf("%s: %s\n", app_name, VERSION); |
554 | exit(0); | 554 | exit(0); |
555 | default: | 555 | default: |
556 | fprintf(stderr, helptext); | 556 | fputs(helptext,stderr); |
557 | exit(1); | 557 | exit(1); |
558 | } | 558 | } |
559 | } | 559 | } |
560 | 560 | ||
561 | if (argv[optind] != NULL) { | 561 | if (argv[optind] != NULL) { |
562 | fprintf(stderr, helptext); | 562 | fputs(helptext,stderr); |
563 | exit(1); | 563 | exit(1); |
564 | } | 564 | } |
565 | 565 | ||