diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index e6f955de314..9d1f91e54f1 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -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);