SF [ 2011550 ] Buffer overflow (change vsprintf to vsnprintf)

This commit is contained in:
zeromus 2008-08-12 03:35:54 +00:00
parent 215d329804
commit c8473ffadb
4 changed files with 10 additions and 8 deletions

View File

@ -1,10 +1,12 @@
---version 2.0.2 released---
10-aug-2008 - punkrockguy318 - SDL: cleaned up the SConsruct
10-aug-2008 - punkrockguy318 - SDL: fixed issue where fceu would lock up when file dialogs were opened during fullscreen
11-aug-2008 - zeromus - SF [ 2011550 ] Buffer overflow (change vsprintf to vsnprintf)
11-aug-2008 - zeromus - SF [ 2047004 ] Moviefilenames without extension don't automatically get fm2
10-aug-2008 - zeromus - upgrade to cah4e3's latest mapper 163&164 code to fix a crash in a game
10-aug-2008 - zeromus - remove cnrom chr rom size limit for homebrew roms
10-aug-2008 - punkrockguy318 - SDL: fixed issue where fceu would lock up when file dialogs were opened during fullscreen
10-aug-2008 - punkrockguy318 - SDL: fixed bug where fceux would close when file dialogs were closed
10-aug-2008 - punkrockguy318 - SDL: File open dialog is now used to movie playback
10-aug-2008 - punkrockguy318 - SDL: File open wrapper now takes a titlebar argument

View File

@ -722,7 +722,7 @@ void FCEU_printf(char *format, ...)
va_list ap;
va_start(ap,format);
vsprintf(temp,format,ap);
vsnprintf(temp,sizeof(temp),format,ap);
FCEUD_Message(temp);
va_end(ap);
@ -735,7 +735,7 @@ void FCEU_PrintError(char *format, ...)
va_list ap;
va_start(ap,format);
vsprintf(temp,format,ap);
vsnprintf(temp,sizeof(temp),format,ap);
FCEUD_PrintError(temp);
va_end(ap);

View File

@ -330,7 +330,7 @@ void FCEU_DispMessageOnMovie(char *format, ...)
va_list ap;
va_start(ap,format);
vsprintf(guiMessage.errmsg,format,ap);
vsnprintf(guiMessage.errmsg,sizeof(guiMessage.errmsg),format,ap);
va_end(ap);
guiMessage.howlong = 180;
@ -342,7 +342,7 @@ void FCEU_DispMessage(char *format, ...)
va_list ap;
va_start(ap,format);
vsprintf(guiMessage.errmsg,format,ap);
vsnprintf(guiMessage.errmsg,sizeof(guiMessage.errmsg),format,ap);
va_end(ap);
guiMessage.howlong = 180;

View File

@ -44,7 +44,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include"
PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL"
PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -134,7 +134,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include"
PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL"
PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"