Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/Libraries/Source/WWVegas/WWLib/Except.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void Dump_Exception_Info(EXCEPTION_POINTERS *e_info)
/*
** Scrap buffer for constructing dump strings
*/
char scrap [256];
char scrap [256] = {};

/*
** Clear out the dump buffer
Expand Down Expand Up @@ -660,7 +660,7 @@ void Dump_Exception_Info(EXCEPTION_POINTERS *e_info)
** Dump the bytes at EIP. This will make it easier to match the crash address with later versions of the game.
*/
DebugString("EIP bytes dump...\n");
sprintf(scrap, "\r\nBytes at CS:EIP (%08X) : ", context->Eip);
snprintf(scrap, ARRAY_SIZE(scrap), "\r\nBytes at CS:EIP (%08X) : ", context->Eip);

unsigned char *eip_ptr = (unsigned char *) (context->Eip);
char bytestr[32];
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Source/Common/System/StackDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ void DumpExceptionInfo( unsigned int u, EXCEPTION_POINTERS* e_info )
/*
** Dump the bytes at EIP. This will make it easier to match the crash address with later versions of the game.
*/
char scrap[512];
char scrap[512] = {};
DOUBLE_DEBUG ( ("EIP bytes dump..."));
wsprintf (scrap, "\nBytes at CS:EIP (%08X) : ", context->Eip);

Expand All @@ -619,7 +619,7 @@ void DumpExceptionInfo( unsigned int u, EXCEPTION_POINTERS* e_info )
{
if (IsBadReadPtr(eip_ptr, 1))
{
lstrcat (scrap, "?? ");
strlcat(scrap, "?? ", ARRAY_SIZE(scrap));
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ void DumpExceptionInfo( unsigned int u, EXCEPTION_POINTERS* e_info )
/*
** Dump the bytes at EIP. This will make it easier to match the crash address with later versions of the game.
*/
char scrap[512];
char scrap[512] = {};
DOUBLE_DEBUG ( ("EIP bytes dump..."));
wsprintf (scrap, "\nBytes at CS:EIP (%08X) : ", context->Eip);

Expand All @@ -619,7 +619,7 @@ void DumpExceptionInfo( unsigned int u, EXCEPTION_POINTERS* e_info )
{
if (IsBadReadPtr(eip_ptr, 1))
{
lstrcat (scrap, "?? ");
strlcat(scrap, "?? ", ARRAY_SIZE(scrap));
}
else
{
Expand Down
Loading