msctf/tests: Don't convert past the end of a nul terminated string.

Found by Valgrind.
This commit is contained in:
Huw Davies 2009-11-13 11:28:39 +00:00 committed by Alexandre Julliard
parent 84ddfd8739
commit 625ec9f05f
1 changed files with 2 additions and 2 deletions

View File

@ -1850,8 +1850,8 @@ static void enum_compartments(ITfCompartmentMgr *cmpmgr, REFGUID present, REFGUI
{
WCHAR str[50];
CHAR strA[50];
StringFromGUID2(&g,str,50);
WideCharToMultiByte(CP_ACP,0,str,50,strA,50,0,0);
StringFromGUID2(&g,str,sizeof(str)/sizeof(str[0]));
WideCharToMultiByte(CP_ACP,0,str,-1,strA,sizeof(strA),0,0);
trace("found %s\n",strA);
if (present && IsEqualGUID(present,&g))
found = TRUE;