Copied from Fedora. http://pkgs.fedoraproject.org/cgit/unzip.git/plain/unzip-6.0-format-secure.patch?id=d18f821e diff --git a/extract.c b/extract.c index eeb2f57..a0a4929 100644 --- a/extract.c +++ b/extract.c @@ -472,8 +472,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ */ Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); - Info(slide, 0x401, ((char *)slide, - LoadFarString(ReportMsg))); + Info(slide, 0x401, + ((char *)slide,"%s", LoadFarString(ReportMsg))); error_in_archive = PK_BADERR; } reached_end = TRUE; /* ...so no more left to do */ @@ -752,8 +752,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ #ifndef SFX if (no_endsig_found) { /* just to make sure */ - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); - Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg))); + Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(ReportMsg))); if (!error_in_archive) /* don't overwrite stronger error */ error_in_archive = PK_WARN; } diff --git a/list.c b/list.c index 15e0011..f7359c3 100644 --- a/list.c +++ b/list.c @@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */ Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, - ((char *)slide, LoadFarString(ReportMsg))); + ((char *)slide,"%s", LoadFarString(ReportMsg))); return PK_BADERR; /* sig not found */ } } @@ -507,7 +507,8 @@ int list_files(__G) /* return PK-type error code */ && (!G.ecrec.is_zip64_archive) && (memcmp(G.sig, end_central_sig, 4) != 0) ) { /* just to make sure again */ - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + Info(slide, 0x401, + ((char *)slide,"%s", LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; /* didn't find sig */ } @@ -591,7 +592,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, - ((char *)slide, LoadFarString(ReportMsg))); + ((char *)slide,"%s", LoadFarString(ReportMsg))); return PK_BADERR; /* sig not found */ } } @@ -674,7 +675,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ ---------------------------------------------------------------------------*/ if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; } if (*nmember == 0L && error_in_archive <= PK_WARN) diff --git a/zipinfo.c b/zipinfo.c index 6e22cc8..ac5c61b 100644 --- a/zipinfo.c +++ b/zipinfo.c @@ -771,7 +771,7 @@ int zipinfo(__G) /* return PK-type error code */ Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, - ((char *)slide, LoadFarString(ReportMsg))); + ((char *)slide,"%s", LoadFarString(ReportMsg))); error_in_archive = PK_BADERR; /* sig not found */ break; } @@ -960,7 +960,8 @@ int zipinfo(__G) /* return PK-type error code */ && (!G.ecrec.is_zip64_archive) && (memcmp(G.sig, end_central_sig, 4) != 0) ) { /* just to make sure again */ - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + Info(slide, 0x401, + ((char *)slide,"%s", LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; /* didn't find sig */ } everal files. [file-hash]: Catch system-error. [formatted-hash]: New procedure. * tests/guix-hash.sh: Add test. * doc/guix.texi (Invoking guix hash): Mention "one or more files". Co-authored-by: Ludovic Courtès <ludo@gnu.org> zimoun 2021-01-04guix hash: Honor '-H' when used alongside '-r'....* guix/scripts/hash.scm (guix-hash): When 'recursive? is true, use 'open-hash-port' instead of 'open-sha256-port'. * tests/guix-hash.sh: Add test for 'guix hash -r -H sha512'. Ludovic Courtès 2020-09-28tests: Simplify shell exit status negation;...* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh: Use the shell '!' keyword to negate command exit status in place of 'if ...; then false; else true; fi' Eric Bavier 2020-05-22guix hash, guix download: Support base64 format....* guix/scripts/download.scm (show-help, %options): Support "base64" format. * guix/scripts/hash.scm (show-help, %options): Likewise. * tests/guix-hash.sh: Test it. * doc/guix.texi (Invoking guix hash): Document it. Ludovic Courtès 2020-05-22guix hash, guix download: Add '--hash'....* guix/scripts/download.scm (%default-options): Add 'hash-algorithm'. (show-help, %options): Add "--hash". (guix-download): Honor it. * guix/scripts/hash.scm (%default-options): Add 'hash-algorithm'. (show-help, %options): Add "--hash". (guix-hash): Honor it. * tests/guix-hash.sh: Test '-H sha512'. * doc/guix.texi (Invoking guix download): Document it. (Invoking guix hash): Document it. Ludovic Courtès