ole32: Remove stack-based string buffer
inFileMonikerImpl_DecomposePath
Ulrich Czekalla
ulrich.czekalla at utoronto.ca
Thu Jun 7 12:43:41 CDT 2007
Silly me that's what I get for copying and pasting what was already there.
Attached is a revised patch.
Thanks,
/Ulrich
On Fri, Jun 08, 2007 at 01:11:03AM +0900, Dmitry Timoshkov wrote:
> "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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filemoniker.diff
Type: text/x-diff
Size: 2291 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070607/c8df0fc5/filemoniker.bin
More information about the wine-patches
mailing list