Codebase list magicrescue / 7d734a5
Add patch 030 Joao Eriberto Mota Filho 5 years ago
3 changed file(s) with 50 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
33 - 20_fix-manpage.patch: renamed to 010_fix-manpage.patch.
44 - 40_add-Perl-preprocessor.patch: renamed to
55 020_add-Perl-preprocessor.patch.
6 - 030_fix-textextract-crash.patch: added to fix a command crash. Thanks
7 to Jonas Jensen <jbj@knef.dk>. (Closes: #716387)
68
79 -- Joao Eriberto Mota Filho <eriberto@debian.org> Fri, 07 Dec 2018 08:13:42 -0200
810
0 Description: fix getopt use in tools
1 Removed the home-made special-casing for `--help`. It's
2 not needed and wasn't interacting right with `getopt`.
3 Author: Jonas Jensen <jbj@knef.dk>
4 Bug-Debian: http://bugs.debian.org/716387
5 Last-Update: 2018-12-02
6 Index: magicrescue/tools/safecat.c
7 ===================================================================
8 --- magicrescue.orig/tools/safecat.c
9 +++ magicrescue/tools/safecat.c
10 @@ -72,7 +72,7 @@ int main(int argc, char **argv)
11 }
12 }
13
14 - if (argc - optind != 1 || strcmp(argv[optind], "--help") == 0) {
15 + if (argc - optind != 1) {
16 usage();
17 return 1;
18 }
19 Index: magicrescue/tools/textextract.c
20 ===================================================================
21 --- magicrescue.orig/tools/textextract.c
22 +++ magicrescue/tools/textextract.c
23 @@ -317,11 +317,6 @@ int main(int argc, char **argv)
24
25 int c, outfd;
26
27 - if (argc < 2 || strcmp(argv[1], "--help") == 0) {
28 - usage();
29 - return 1;
30 - }
31 -
32 while ((c = getopt(argc, argv, "M:s:b:l:r:")) >= 0) {
33 switch (c) {
34 case 'M':
35 @@ -351,6 +346,11 @@ int main(int argc, char **argv)
36 }
37 }
38
39 + if (argc - optind != 1) {
40 + usage();
41 + return 1;
42 + }
43 +
44 if (strcmp(argv[optind], "-") == 0) {
45 outfd = 1;
46 } else if ((outfd =
00 010_fix-manpage.patch
11 020_add-Perl-preprocessor.patch
2 030_fix-textextract-crash.patch