From ea9e897407dd78097c47ccfcdab0f640be3dbb6d Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 18 Dec 2004 01:03:26 +0000 Subject: [PATCH] use _vsnprintf to fix buffer overflow --- xwords4/wince/cemain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xwords4/wince/cemain.c b/xwords4/wince/cemain.c index 11cf6d095..f31fb88f7 100755 --- a/xwords4/wince/cemain.c +++ b/xwords4/wince/cemain.c @@ -851,8 +851,7 @@ ceCountsAndValues( CEAppGlobals* globals ) if ( !!globals->game.server ) { XWStreamCtxt* stream = make_generic_stream( globals ); - server_formatDictCounts( globals->game.server, stream, - 3 ); /* 2: ncols */ + server_formatDictCounts( globals->game.server, stream, 3 ); (void)ceMsgFromStream( globals, stream, L"Tile Counts and Values", XP_FALSE, XP_TRUE ); @@ -1695,7 +1694,7 @@ wince_snprintf( XP_UCHAR* buf, XP_U16 len, XP_UCHAR* format, ... ) va_start( ap, format ); - vsprintf( buf, format, ap ); + _vsnprintf( buf, len, format, ap ); /* FormatMessage( */ /* FORMAT_MESSAGE_FROM_STRING, */