summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.vom>2022-03-10 05:25:06 +0000
committerArmin Kuster <akuster808@gmail.com>2022-03-27 08:18:20 -0700
commite6a4c8e5c546e684eae839a22a7dec65c3d67050 (patch)
tree4ef52c97207b606741369700270eda561bfc1569
parent7334bc295d606e85971a9f82625b49521061e3c5 (diff)
downloadmeta-openembedded-e6a4c8e5c546e684eae839a22a7dec65c3d67050.tar.gz
p7zip: refresh patches
Signed-off-by: Armin Kuster <akuster808@gmail.vom>
-rw-r--r--meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch72
-rw-r--r--meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch14
2 files changed, 44 insertions, 42 deletions
diff --git a/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch b/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch
index 0de39e78bd..b6deb5d3a7 100644
--- a/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch
+++ b/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch
@@ -20,10 +20,10 @@ Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
20 CPP/7zip/Compress/Rar3Decoder.h | 2 ++ 20 CPP/7zip/Compress/Rar3Decoder.h | 2 ++
21 6 files changed, 42 insertions(+), 8 deletions(-) 21 6 files changed, 42 insertions(+), 8 deletions(-)
22 22
23diff --git a/CPP/7zip/Compress/Rar1Decoder.cpp b/CPP/7zip/Compress/Rar1Decoder.cpp 23Index: p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.cpp
24index 1aaedcc..68030c7 100644 24===================================================================
25--- a/CPP/7zip/Compress/Rar1Decoder.cpp 25--- p7zip_16.02.orig/CPP/7zip/Compress/Rar1Decoder.cpp
26+++ b/CPP/7zip/Compress/Rar1Decoder.cpp 26+++ p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.cpp
27@@ -29,7 +29,7 @@ public: 27@@ -29,7 +29,7 @@ public:
28 }; 28 };
29 */ 29 */
@@ -33,7 +33,7 @@ index 1aaedcc..68030c7 100644
33 33
34 void CDecoder::InitStructures() 34 void CDecoder::InitStructures()
35 { 35 {
36@@ -406,9 +406,14 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream * 36@@ -406,9 +406,14 @@ HRESULT CDecoder::CodeReal(ISequentialIn
37 InitData(); 37 InitData();
38 if (!m_IsSolid) 38 if (!m_IsSolid)
39 { 39 {
@@ -48,7 +48,7 @@ index 1aaedcc..68030c7 100644
48 if (m_UnpackSize > 0) 48 if (m_UnpackSize > 0)
49 { 49 {
50 GetFlagsBuf(); 50 GetFlagsBuf();
51@@ -477,9 +482,9 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream 51@@ -477,9 +482,9 @@ STDMETHODIMP CDecoder::Code(ISequentialI
52 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) 52 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress)
53 { 53 {
54 try { return CodeReal(inStream, outStream, inSize, outSize, progress); } 54 try { return CodeReal(inStream, outStream, inSize, outSize, progress); }
@@ -61,10 +61,10 @@ index 1aaedcc..68030c7 100644
61 } 61 }
62 62
63 STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size) 63 STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)
64diff --git a/CPP/7zip/Compress/Rar1Decoder.h b/CPP/7zip/Compress/Rar1Decoder.h 64Index: p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.h
65index 630f089..01b606b 100644 65===================================================================
66--- a/CPP/7zip/Compress/Rar1Decoder.h 66--- p7zip_16.02.orig/CPP/7zip/Compress/Rar1Decoder.h
67+++ b/CPP/7zip/Compress/Rar1Decoder.h 67+++ p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.h
68@@ -39,6 +39,7 @@ public: 68@@ -39,6 +39,7 @@ public:
69 69
70 Int64 m_UnpackSize; 70 Int64 m_UnpackSize;
@@ -73,11 +73,11 @@ index 630f089..01b606b 100644
73 73
74 UInt32 ReadBits(int numBits); 74 UInt32 ReadBits(int numBits);
75 HRESULT CopyBlock(UInt32 distance, UInt32 len); 75 HRESULT CopyBlock(UInt32 distance, UInt32 len);
76diff --git a/CPP/7zip/Compress/Rar2Decoder.cpp b/CPP/7zip/Compress/Rar2Decoder.cpp 76Index: p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.cpp
77index b3f2b4b..0580c8d 100644 77===================================================================
78--- a/CPP/7zip/Compress/Rar2Decoder.cpp 78--- p7zip_16.02.orig/CPP/7zip/Compress/Rar2Decoder.cpp
79+++ b/CPP/7zip/Compress/Rar2Decoder.cpp 79+++ p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.cpp
80@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 << 20; 80@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 <<
81 static const UInt32 kWindowReservSize = (1 << 22) + 256; 81 static const UInt32 kWindowReservSize = (1 << 22) + 256;
82 82
83 CDecoder::CDecoder(): 83 CDecoder::CDecoder():
@@ -87,7 +87,7 @@ index b3f2b4b..0580c8d 100644
87 { 87 {
88 } 88 }
89 89
90@@ -100,6 +101,8 @@ UInt32 CDecoder::ReadBits(unsigned numBits) { return m_InBitStream.ReadBits(numB 90@@ -100,6 +101,8 @@ UInt32 CDecoder::ReadBits(unsigned numBi
91 91
92 bool CDecoder::ReadTables(void) 92 bool CDecoder::ReadTables(void)
93 { 93 {
@@ -105,7 +105,7 @@ index b3f2b4b..0580c8d 100644
105 return true; 105 return true;
106 } 106 }
107 107
108@@ -344,6 +349,9 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream * 108@@ -344,6 +349,9 @@ HRESULT CDecoder::CodeReal(ISequentialIn
109 return S_FALSE; 109 return S_FALSE;
110 } 110 }
111 111
@@ -115,10 +115,10 @@ index b3f2b4b..0580c8d 100644
115 UInt64 startPos = m_OutWindowStream.GetProcessedSize(); 115 UInt64 startPos = m_OutWindowStream.GetProcessedSize();
116 while (pos < unPackSize) 116 while (pos < unPackSize)
117 { 117 {
118diff --git a/CPP/7zip/Compress/Rar2Decoder.h b/CPP/7zip/Compress/Rar2Decoder.h 118Index: p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.h
119index 3a0535c..0e9005f 100644 119===================================================================
120--- a/CPP/7zip/Compress/Rar2Decoder.h 120--- p7zip_16.02.orig/CPP/7zip/Compress/Rar2Decoder.h
121+++ b/CPP/7zip/Compress/Rar2Decoder.h 121+++ p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.h
122@@ -139,6 +139,7 @@ class CDecoder : 122@@ -139,6 +139,7 @@ class CDecoder :
123 123
124 UInt64 m_PackSize; 124 UInt64 m_PackSize;
@@ -127,10 +127,10 @@ index 3a0535c..0e9005f 100644
127 127
128 void InitStructures(); 128 void InitStructures();
129 UInt32 ReadBits(unsigned numBits); 129 UInt32 ReadBits(unsigned numBits);
130diff --git a/CPP/7zip/Compress/Rar3Decoder.cpp b/CPP/7zip/Compress/Rar3Decoder.cpp 130Index: p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.cpp
131index 3bf2513..6cb8a6a 100644 131===================================================================
132--- a/CPP/7zip/Compress/Rar3Decoder.cpp 132--- p7zip_16.02.orig/CPP/7zip/Compress/Rar3Decoder.cpp
133+++ b/CPP/7zip/Compress/Rar3Decoder.cpp 133+++ p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.cpp
134@@ -92,7 +92,8 @@ CDecoder::CDecoder(): 134@@ -92,7 +92,8 @@ CDecoder::CDecoder():
135 _writtenFileSize(0), 135 _writtenFileSize(0),
136 _vmData(0), 136 _vmData(0),
@@ -141,7 +141,7 @@ index 3bf2513..6cb8a6a 100644
141 { 141 {
142 Ppmd7_Construct(&_ppmd); 142 Ppmd7_Construct(&_ppmd);
143 } 143 }
144@@ -545,6 +546,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing) 144@@ -545,6 +546,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
145 return InitPPM(); 145 return InitPPM();
146 } 146 }
147 147
@@ -151,7 +151,7 @@ index 3bf2513..6cb8a6a 100644
151 _lzMode = true; 151 _lzMode = true;
152 PrevAlignBits = 0; 152 PrevAlignBits = 0;
153 PrevAlignCount = 0; 153 PrevAlignCount = 0;
154@@ -606,6 +610,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing) 154@@ -606,6 +610,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
155 } 155 }
156 } 156 }
157 } 157 }
@@ -161,7 +161,7 @@ index 3bf2513..6cb8a6a 100644
161 TablesRead = true; 161 TablesRead = true;
162 162
163 // original code has check here: 163 // original code has check here:
164@@ -623,6 +630,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing) 164@@ -623,6 +630,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
165 RIF(m_LenDecoder.Build(&newLevels[kMainTableSize + kDistTableSize + kAlignTableSize])); 165 RIF(m_LenDecoder.Build(&newLevels[kMainTableSize + kDistTableSize + kAlignTableSize]));
166 166
167 memcpy(m_LastLevels, newLevels, kTablesSizesSum); 167 memcpy(m_LastLevels, newLevels, kTablesSizesSum);
@@ -171,7 +171,7 @@ index 3bf2513..6cb8a6a 100644
171 return S_OK; 171 return S_OK;
172 } 172 }
173 173
174@@ -824,7 +834,12 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress) 174@@ -824,7 +834,12 @@ HRESULT CDecoder::CodeReal(ICompressProg
175 PpmEscChar = 2; 175 PpmEscChar = 2;
176 PpmError = true; 176 PpmError = true;
177 InitFilters(); 177 InitFilters();
@@ -184,7 +184,7 @@ index 3bf2513..6cb8a6a 100644
184 if (!m_IsSolid || !TablesRead) 184 if (!m_IsSolid || !TablesRead)
185 { 185 {
186 bool keepDecompressing; 186 bool keepDecompressing;
187@@ -838,6 +853,8 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress) 187@@ -838,6 +853,8 @@ HRESULT CDecoder::CodeReal(ICompressProg
188 bool keepDecompressing; 188 bool keepDecompressing;
189 if (_lzMode) 189 if (_lzMode)
190 { 190 {
@@ -193,7 +193,7 @@ index 3bf2513..6cb8a6a 100644
193 RINOK(DecodeLZ(keepDecompressing)) 193 RINOK(DecodeLZ(keepDecompressing))
194 } 194 }
195 else 195 else
196@@ -901,8 +918,8 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream 196@@ -901,8 +918,8 @@ STDMETHODIMP CDecoder::Code(ISequentialI
197 _unpackSize = outSize ? *outSize : (UInt64)(Int64)-1; 197 _unpackSize = outSize ? *outSize : (UInt64)(Int64)-1;
198 return CodeReal(progress); 198 return CodeReal(progress);
199 } 199 }
@@ -204,10 +204,10 @@ index 3bf2513..6cb8a6a 100644
204 // CNewException is possible here. But probably CNewException is caused 204 // CNewException is possible here. But probably CNewException is caused
205 // by error in data stream. 205 // by error in data stream.
206 } 206 }
207diff --git a/CPP/7zip/Compress/Rar3Decoder.h b/CPP/7zip/Compress/Rar3Decoder.h 207Index: p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.h
208index c130cec..2f72d7d 100644 208===================================================================
209--- a/CPP/7zip/Compress/Rar3Decoder.h 209--- p7zip_16.02.orig/CPP/7zip/Compress/Rar3Decoder.h
210+++ b/CPP/7zip/Compress/Rar3Decoder.h 210+++ p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.h
211@@ -192,6 +192,7 @@ class CDecoder: 211@@ -192,6 +192,7 @@ class CDecoder:
212 UInt32 _lastFilter; 212 UInt32 _lastFilter;
213 213
@@ -223,4 +223,4 @@ index c130cec..2f72d7d 100644
223+ bool TablesOK; 223+ bool TablesOK;
224 224
225 CPpmd7 _ppmd; 225 CPpmd7 _ppmd;
226 int PpmEscChar; \ No newline at end of file 226 int PpmEscChar;
diff --git a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
index edde525933..dcde83e8a4 100644
--- a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
+++ b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
@@ -12,14 +12,16 @@ use unsigned instead of bool
12Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> 12Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
13 13
14Upstream-Status: Pending 14Upstream-Status: Pending
15--- ./CPP/7zip/Archive/Wim/WimHandler.cpp 2021-05-20 10:51:56.997402701 +0000 15Index: p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
16+++ ./CPP/7zip/Archive/Wim/WimHandler.cpp 2021-05-20 10:52:16.665604125 +0000 16===================================================================
17@@ -298,7 +298,7 @@ 17--- p7zip_16.02.orig/CPP/7zip/Archive/Wim/WimHandler.cpp
18 18+++ p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
19@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchivePropert
20
19 AString res; 21 AString res;
20 22
21- bool numMethods = 0; 23- bool numMethods = 0;
22+ unsigned numMethods = 0; 24+ unsigned numMethods = 0;
23 for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++) 25 for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)
24 { 26 {
25 if (methodMask & ((UInt32)1 << i 27 if (methodMask & ((UInt32)1 << i))