added skipping map files packing to prevent crash that happens after playing too many custom maps

This commit is contained in:
Your Name 2023-12-16 17:40:37 +01:00
parent 1074db2711
commit 47bab9cb54

View File

@ -258,6 +258,15 @@ static struct SrcdsPatch
(unsigned char *)"\xEB\x23\x89\xD0\x25\x00\x00\x00\x00\xC1\xE0\x04",
"cstrike/bin/server_srv.so"
},
// 14: CZipPackFile::Prepare: Always jump into "Pack file uses unsupported compression method:"
//this avoids crashes when loading maps because of unsigned short overflowing.
{
"_ZN12CZipPackFile7PrepareExx",
(unsigned char *)"\x0F\x85\x32\x03\x00\x00",
"xxxxxx",
(unsigned char *)"\xEB\x85\x32\x03\x00\x00" ,
"bin/dedicated_srv.so"
},
};
class CBaseEntity;
@ -848,7 +857,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
if(found)
break;
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);
SDK_OnUnload();
return false;
}
@ -1027,4 +1036,4 @@ uintptr_t FindFunctionCall(uintptr_t BaseAddr, uintptr_t Function, size_t MaxSiz
}
return 0x00;
}
}