File CVE-2025-53817.patch of Package p7zip.40594
Index: b/CPP/7zip/Archive/ComHandler.cpp
===================================================================
--- a/CPP/7zip/Archive/ComHandler.cpp
+++ b/CPP/7zip/Archive/ComHandler.cpp
@@ -521,6 +521,10 @@ HRESULT CDatabase::Open(IInStream *inStr
{
CItem item;
item.Parse(sect + i, mode64bit);
+ // we use (item.Size) check here.
+ // so we don't need additional overflow checks for (item.Size +) in another code
+ if (item.Size >= ((UInt64)1 << 63))
+ return S_FALSE;
Items.Add(item);
}
sid = Fat[sid];