Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
p7zip.6679
p7zip-9.20.1-CVE-2016-1372.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File p7zip-9.20.1-CVE-2016-1372.patch of Package p7zip.6679
Index: p7zip_9.20.1/CPP/7zip/Archive/7z/7zIn.cpp =================================================================== --- p7zip_9.20.1.orig/CPP/7zip/Archive/7z/7zIn.cpp +++ p7zip_9.20.1/CPP/7zip/Archive/7z/7zIn.cpp @@ -111,6 +111,20 @@ static inline void ThrowUnsupported() { static inline void ThrowIncorrect() { ThrowException(); } static inline void ThrowUnsupportedVersion() { ThrowException(); } +UInt64 CArchiveDatabaseEx::GetFolderFullPackSize(int folderIndex) const +{ + CNum packStreamIndex = FolderStartPackStreamIndex[folderIndex]; + const CFolder &folder = Folders[folderIndex]; + UInt64 size = 0; + for (int i = 0; i < folder.PackStreams.Size(); i++) + { + if (PackSizes.IsEmpty()) + ThrowIncorrect(); + size += PackSizes[packStreamIndex + i]; + } + return size; +} + /* class CInArchiveException { @@ -173,6 +187,8 @@ void CStreamSwitch::Set(CInArchive *arch Byte external = archive->ReadByte(); if (external != 0) { + if (!dataVector) + ThrowIncorrect(); int dataIndex = (int)archive->ReadNum(); if (dataIndex < 0 || dataIndex >= dataVector->Size()) ThrowIncorrect(); @@ -1028,6 +1044,9 @@ HRESULT CInArchive::ReadHeader( ThrowIncorrect(); } + if (numFiles - numEmptyStreams != unpackSizes.Size()) + ThrowUnsupported(); + CNum emptyFileIndex = 0; CNum sizeIndex = 0; Index: p7zip_9.20.1/CPP/7zip/Archive/7z/7zIn.h =================================================================== --- p7zip_9.20.1.orig/CPP/7zip/Archive/7z/7zIn.h +++ p7zip_9.20.1/CPP/7zip/Archive/7z/7zIn.h @@ -71,15 +71,7 @@ struct CArchiveDatabaseEx: public CArchi PackStreamStartPositions[FolderStartPackStreamIndex[folderIndex] + indexInFolder]; } - UInt64 GetFolderFullPackSize(int folderIndex) const - { - CNum packStreamIndex = FolderStartPackStreamIndex[folderIndex]; - const CFolder &folder = Folders[folderIndex]; - UInt64 size = 0; - for (int i = 0; i < folder.PackStreams.Size(); i++) - size += PackSizes[packStreamIndex + i]; - return size; - } + UInt64 GetFolderFullPackSize(int folderIndex) const; UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor