hhctrl.ocx: Fix a buffer allocation size.

This commit is contained in:
Alexandre Julliard 2012-02-13 12:28:32 +01:00
parent cd3af0531b
commit 8e1dbebdb0

View file

@ -223,7 +223,8 @@ static WCHAR *FindHTMLHelpSetting(HHInfo *info, const WCHAR *extW)
WCHAR *filename;
HRESULT hr;
filename = heap_alloc(strlenW(info->pCHMInfo->compiledFile)+strlenW(periodW)+strlenW(extW)+1);
filename = heap_alloc( (strlenW(info->pCHMInfo->compiledFile)
+ strlenW(periodW) + strlenW(extW) + 1) * sizeof(WCHAR) );
strcpyW(filename, info->pCHMInfo->compiledFile);
strcatW(filename, periodW);
strcatW(filename, extW);