Fix overflows in buffer
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1982
This commit is contained in:
parent
7c7b9b0539
commit
293535b8e2
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: programs.cpp,v 1.14 2004-08-04 09:12:56 qbix79 Exp $ */
|
||||
/* $Id: programs.cpp,v 1.15 2004-09-16 21:47:39 qbix79 Exp $ */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -96,11 +96,11 @@ Program::Program() {
|
|||
}
|
||||
|
||||
void Program::WriteOut(const char * format,...) {
|
||||
char buf[1024];
|
||||
char buf[2048];
|
||||
va_list msg;
|
||||
|
||||
va_start(msg,format);
|
||||
vsprintf(buf,format,msg);
|
||||
vsnprintf(buf,2047,format,msg);
|
||||
va_end(msg);
|
||||
|
||||
Bit16u size=strlen(buf);
|
||||
|
|
Loading…
Add table
Reference in a new issue