From d80aa8b59ce2321ca88003923805ea5aa1d45682 Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 6 Aug 2026 23:37:22 +0100 Subject: [PATCH] added NOP for FindOrAddFileName --- extension.cpp | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/extension.cpp b/extension.cpp index ad4a86c..2de17f3 100644 --- a/extension.cpp +++ b/extension.cpp @@ -270,38 +270,18 @@ static struct SrcdsPatch "cstrike/bin/server_srv.so" }, - // 15: I CUtlLinkedList::AllocInternal( bool multilist ) - //skip CUtlLinkedList overflow! (exhausted memory allocator) and CUtlLinkedList overflow! (exhausted index range) - //this avoids crashing when loading over 64k strings into stringpool. Custom assets in maps lead towards the limit. jenz- December 2023 - // \x90 prevent green, - // \xEB prevent red - /* - { - "_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb", - (unsigned char *)"\x74\x0C", - "xx", - (unsigned char *)"\x90\x90", - "bin/dedicated_srv.so" - }, - { - "_ZN12CZipPackFile7PrepareExx", - (unsigned char *)"\x0F\x85\x32\x03\x00\x00", - "_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb", - (unsigned char *)"\x0F\x87\x7A\xFF\xFF\xFF", - "xxxxxx", - (unsigned char *)"\xEB\x85\x32\x03\x00\x00" , - (unsigned char *)"\xEB\x87\x7A\xFF\xFF\xFF", - "bin/dedicated_srv.so" - }, - { - "_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb", - (unsigned char *)"\x0F\x84\x9C\x00\x00\x00", - "xxxxxx", - (unsigned char *)"\x90\x90\x90\x90\x90\x90", - "bin/dedicated_srv.so" - }, - - */ + // 15: bool CZipPackFile::Prepare( int64 fileLen, int64 nFileOfs ) + //NOPs out lookup.m_hFileName = m_fs->FindOrAddFileName( tmpString ); Line 768 + //stop the errors CUtlLinkedList overflow! (exhausted memory allocator) and CUtlLinkedList overflow! (exhausted index range) + //this avoids crashing due to loading over 65k strings into stringpool. Custom assets in maps lead towards the limit. jenz- December 2023 + { + "_ZN12CZipPackFile7PrepareExx", + (unsigned char *)"\x8B\x10\x57\x50\xFF\x92\x8C\x00\x00\x00", + "xxxxxxxxxx", + (unsigned char *)"\x8B\x10\x57\x50\x31\xC0\x90\x90\x90\x90", + "bin/dedicated_srv.so", + 0x600 + }, // 16: Remove weird filename handle check in CZipPackFile::GetFileInfo that broke loading mixed case files in bsp pakfiles { "_ZN12CZipPackFile11GetFileInfoEPKcRiRxS2_S2_Rt",