]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/p7zip/CVE-2016-2334.patch
Update libvirt to 2.1
[ipfire-2.x.git] / src / patches / p7zip / CVE-2016-2334.patch
1 Index: p7zip_15.14.1/CPP/7zip/Archive/HfsHandler.cpp
2 ===================================================================
3 --- p7zip_15.14.1.orig/CPP/7zip/Archive/HfsHandler.cpp
4 +++ p7zip_15.14.1/CPP/7zip/Archive/HfsHandler.cpp
5 @@ -987,7 +987,9 @@ HRESULT CDatabase::LoadCatalog(const CFo
6 item.GroupID = Get32(r + 0x24);
7 item.AdminFlags = r[0x28];
8 item.OwnerFlags = r[0x29];
9 + */
10 item.FileMode = Get16(r + 0x2A);
11 + /*
12 item.special.iNodeNum = Get16(r + 0x2C); // or .linkCount
13 item.FileType = Get32(r + 0x30);
14 item.FileCreator = Get32(r + 0x34);
15 @@ -1572,6 +1574,9 @@ HRESULT CHandler::ExtractZlibFile(
16
17 UInt32 size = GetUi32(tableBuf + i * 8 + 4);
18
19 + if (size > buf.Size() || size > kCompressionBlockSize + 1)
20 + return S_FALSE;
21 +
22 RINOK(ReadStream_FALSE(inStream, buf, size));
23
24 if ((buf[0] & 0xF) == 0xF)