ole32: Remove stack-based string buffer inFileMonikerImpl_DecomposePath

Dmitry Timoshkov dmitry at codeweavers.com
Thu Jun 7 11:11:03 CDT 2007


"Ulrich Czekalla" <ulrich.czekalla at utoronto.ca> wrote:

> -    WCHAR word[MAX_PATH];
> -    int i=0,j,tabIndex=0;
> +    LPOLESTR word;
> +    int i=0,j,tabIndex=0, ret=0;
>     LPOLESTR *strgtable ;
> 
>     int len=lstrlenW(str);
> 
>     TRACE("%s, %p\n", debugstr_w(str), *stringTable);
> 
> -    strgtable =CoTaskMemAlloc(len*sizeof(LPOLESTR));
> +    strgtable = CoTaskMemAlloc(len*sizeof(LPOLESTR));
> 
>     if (strgtable==NULL)
>  return E_OUTOFMEMORY;
> 
> +    word = CoTaskMemAlloc((len + 1)*sizeof(LPOLESTR));

Shouldn't it be *sizeof(WCHAR) or *sizeof(OLECHAR)?

-- 
Dmitry.



More information about the wine-devel mailing list