diff options
author | Jonathan Gray | 2005-04-09 01:52:44 +0000 |
---|---|---|
committer | Jonathan Gray | 2005-04-09 01:52:44 +0000 |
commit | 24c92d00919500a725a6d4c4797b48088b56431f (patch) | |
tree | 3473f42551f3263c3aa586e48d2648f251f293f3 /backends/gp32 | |
parent | aff66038f3fd5b0e5af49c94c7f0a5270981f7cf (diff) | |
download | scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.tar.gz scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.tar.bz2 scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.zip |
Remove usage of vsprintf in favour of vsnprintf and make
more use of STRINGBUFLEN. Some ports may need a new stub for
this, discussed with Chrilith.
svn-id: r17463
Diffstat (limited to 'backends/gp32')
-rw-r--r-- | backends/gp32/debug-gdbstub-usb.cpp | 2 | ||||
-rw-r--r-- | backends/gp32/gp32.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/gp32/debug-gdbstub-usb.cpp b/backends/gp32/debug-gdbstub-usb.cpp index 14ab38d7d6..15328c1511 100644 --- a/backends/gp32/debug-gdbstub-usb.cpp +++ b/backends/gp32/debug-gdbstub-usb.cpp @@ -994,7 +994,7 @@ void DEBUG_Print(char *pFormat, ...) if (!g_GDBConnected) return; va_start(VaList , pFormat); - vsprintf(Temp , pFormat , VaList); + vsnprintf(Temp, 0x100, pFormat , VaList); va_end(VaList); iLength = strlen(Temp); diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp index 0ff9827a0a..1d1a4adc58 100644 --- a/backends/gp32/gp32.cpp +++ b/backends/gp32/gp32.cpp @@ -2430,7 +2430,7 @@ int gpprintf(const char *fmt, ...) { return 0; busy = true; va_start(marker, fmt); - vsprintf(s, fmt, marker); + vsnprintf(s, 1024, fmt, marker); va_end(marker); #ifdef GPDEBUG @@ -2460,7 +2460,7 @@ int gpfprintf(FILE *stream, const char *fmt, ...) { va_list marker; va_start(marker, fmt); - vsprintf(s, fmt, marker); + vsnprintf(s, 256, fmt, marker); va_end(marker); return fwrite(s, 1, strlen(s), stream); |