Magellan Linux

Contents of /trunk/unzip/patches/unzip-6.0-format-security.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3734 - (show annotations) (download)
Fri Jul 21 13:36:29 2023 UTC (9 months, 3 weeks ago) by niro
File size: 4424 byte(s)
-gentoo patches
1 Fix build with -Werror=format-security
2
3 Origin: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=f7d80257afcfefdc85b6745328f2d12b957a848b
4 Author: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
5
6 diff --git a/extract.c b/extract.c
7 index 7cd9123..25c5a62 100644
8 --- a/extract.c
9 +++ b/extract.c
10 @@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */
11 Info(slide, 0x401, ((char *)slide,
12 LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1));
13 Info(slide, 0x401, ((char *)slide,
14 - LoadFarString(ReportMsg)));
15 + "%s",LoadFarString(ReportMsg)));
16 error_in_archive = PK_BADERR;
17 }
18 reached_end = TRUE; /* ...so no more left to do */
19 @@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
20
21 #ifndef SFX
22 if (no_endsig_found) { /* just to make sure */
23 - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
24 - Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
25 + Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
26 + Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg)));
27 if (!error_in_archive) /* don't overwrite stronger error */
28 error_in_archive = PK_WARN;
29 }
30 diff --git a/list.c b/list.c
31 index 15e0011..0b484f6 100644
32 --- a/list.c
33 +++ b/list.c
34 @@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */
35 Info(slide, 0x401,
36 ((char *)slide, LoadFarString(CentSigMsg), j));
37 Info(slide, 0x401,
38 - ((char *)slide, LoadFarString(ReportMsg)));
39 + ((char *)slide, "%s", LoadFarString(ReportMsg)));
40 return PK_BADERR; /* sig not found */
41 }
42 }
43 @@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */
44 && (!G.ecrec.is_zip64_archive)
45 && (memcmp(G.sig, end_central_sig, 4) != 0)
46 ) { /* just to make sure again */
47 - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
48 + Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
49 error_in_archive = PK_WARN; /* didn't find sig */
50 }
51
52 @@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
53 Info(slide, 0x401,
54 ((char *)slide, LoadFarString(CentSigMsg), j));
55 Info(slide, 0x401,
56 - ((char *)slide, LoadFarString(ReportMsg)));
57 + ((char *)slide, "%s", LoadFarString(ReportMsg)));
58 return PK_BADERR; /* sig not found */
59 }
60 }
61 @@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
62 ---------------------------------------------------------------------------*/
63
64 if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */
65 - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
66 + Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
67 error_in_archive = PK_WARN;
68 }
69 if (*nmember == 0L && error_in_archive <= PK_WARN)
70 diff --git a/zipinfo.c b/zipinfo.c
71 index 0ac75b3..1e7fa82 100644
72 --- a/zipinfo.c
73 +++ b/zipinfo.c
74 @@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */
75 Info(slide, 0x401,
76 ((char *)slide, LoadFarString(CentSigMsg), j));
77 Info(slide, 0x401,
78 - ((char *)slide, LoadFarString(ReportMsg)));
79 + ((char *)slide, "%s", LoadFarString(ReportMsg)));
80 error_in_archive = PK_BADERR; /* sig not found */
81 break;
82 }
83 @@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */
84 && (!G.ecrec.is_zip64_archive)
85 && (memcmp(G.sig, end_central_sig, 4) != 0)
86 ) { /* just to make sure again */
87 - Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
88 + Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
89 error_in_archive = PK_WARN; /* didn't find sig */
90 }
91