gnu: abseil-cpp: Patch sterror_test.
[jackhill/guix/guix.git] / gnu / packages / patches / unzip-format-secure.patch
CommitLineData
48e4a9f3
MW
1Copied from Fedora.
2
3http://pkgs.fedoraproject.org/cgit/unzip.git/plain/unzip-6.0-format-secure.patch?id=d18f821e
4
5diff --git a/extract.c b/extract.c
6index eeb2f57..a0a4929 100644
7--- a/extract.c
8+++ b/extract.c
9@@ -472,8 +472,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
10 */
11 Info(slide, 0x401, ((char *)slide,
12 LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1));
13- Info(slide, 0x401, ((char *)slide,
14- LoadFarString(ReportMsg)));
15+ Info(slide, 0x401,
16+ ((char *)slide,"%s", LoadFarString(ReportMsg)));
17 error_in_archive = PK_BADERR;
18 }
19 reached_end = TRUE; /* ...so no more left to do */
20@@ -752,8 +752,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
21
22 #ifndef SFX
23 if (no_endsig_found) { /* just to make sure */
24- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
25- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
26+ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg)));
27+ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(ReportMsg)));
28 if (!error_in_archive) /* don't overwrite stronger error */
29 error_in_archive = PK_WARN;
30 }
31diff --git a/list.c b/list.c
32index 15e0011..f7359c3 100644
33--- a/list.c
34+++ b/list.c
35@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */
36 Info(slide, 0x401,
37 ((char *)slide, LoadFarString(CentSigMsg), j));
38 Info(slide, 0x401,
39- ((char *)slide, LoadFarString(ReportMsg)));
40+ ((char *)slide,"%s", LoadFarString(ReportMsg)));
41 return PK_BADERR; /* sig not found */
42 }
43 }
44@@ -507,7 +507,8 @@ int list_files(__G) /* return PK-type error code */
45 && (!G.ecrec.is_zip64_archive)
46 && (memcmp(G.sig, end_central_sig, 4) != 0)
47 ) { /* just to make sure again */
48- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
49+ Info(slide, 0x401,
50+ ((char *)slide,"%s", LoadFarString(EndSigMsg)));
51 error_in_archive = PK_WARN; /* didn't find sig */
52 }
53
54@@ -591,7 +592,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
55 Info(slide, 0x401,
56 ((char *)slide, LoadFarString(CentSigMsg), j));
57 Info(slide, 0x401,
58- ((char *)slide, LoadFarString(ReportMsg)));
59+ ((char *)slide,"%s", LoadFarString(ReportMsg)));
60 return PK_BADERR; /* sig not found */
61 }
62 }
63@@ -674,7 +675,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
64 ---------------------------------------------------------------------------*/
65
66 if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */
67- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
68+ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg)));
69 error_in_archive = PK_WARN;
70 }
71 if (*nmember == 0L && error_in_archive <= PK_WARN)
72diff --git a/zipinfo.c b/zipinfo.c
73index 6e22cc8..ac5c61b 100644
74--- a/zipinfo.c
75+++ b/zipinfo.c
76@@ -771,7 +771,7 @@ int zipinfo(__G) /* return PK-type error code */
77 Info(slide, 0x401,
78 ((char *)slide, LoadFarString(CentSigMsg), j));
79 Info(slide, 0x401,
80- ((char *)slide, LoadFarString(ReportMsg)));
81+ ((char *)slide,"%s", LoadFarString(ReportMsg)));
82 error_in_archive = PK_BADERR; /* sig not found */
83 break;
84 }
85@@ -960,7 +960,8 @@ int zipinfo(__G) /* return PK-type error code */
86 && (!G.ecrec.is_zip64_archive)
87 && (memcmp(G.sig, end_central_sig, 4) != 0)
88 ) { /* just to make sure again */
89- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
90+ Info(slide, 0x401,
91+ ((char *)slide,"%s", LoadFarString(EndSigMsg)));
92 error_in_archive = PK_WARN; /* didn't find sig */
93 }
94