Cool buffer overflow, NTAuthority!
This commit is contained in:
parent
f48bb934ac
commit
ee42fd20b0
@ -102,7 +102,7 @@ namespace Components
|
||||
void Materials::DumpImageCfgPath(int, const char*, const char* material)
|
||||
{
|
||||
FILE* fp = nullptr;
|
||||
if (!fopen_s(&fp, "dump.cfg", "a") && fp != nullptr)
|
||||
if (!fopen_s(&fp, "dump.cfg", "a") && fp)
|
||||
{
|
||||
fprintf(fp, "dumpraw %s\n", material);
|
||||
fclose(fp);
|
||||
|
@ -858,7 +858,7 @@ namespace Components
|
||||
{
|
||||
bool result = Game::Load_Stream(atStreamStart, buffer, 84);
|
||||
|
||||
static char tempVar[84];
|
||||
char tempVar[84] = { 0 };
|
||||
std::memcpy(&tempVar[0], &buffer[0], 44);
|
||||
std::memcpy(&tempVar[56], &buffer[44], 28);
|
||||
std::memcpy(&tempVar[44], &buffer[72], 12);
|
||||
@ -938,9 +938,9 @@ namespace Components
|
||||
{
|
||||
bool result = Game::Load_Stream(atStreamStart, buffer, 788);
|
||||
|
||||
static char tempVar[788];
|
||||
char tempVar[788] = { 0 };
|
||||
std::memcpy(&tempVar[0], &buffer[0], 400);
|
||||
std::memcpy(&tempVar[408], &buffer[400], 388);
|
||||
std::memcpy(&tempVar[408], &buffer[400], 380);
|
||||
|
||||
AssetHandler::Relocate(buffer + 400, buffer + 408, 388);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user