ole32: Fix off-by-one error in FileMonikerImpl_DecomposePath.

strgtable needs to be an array of the same size as str, including the
nul-terminator.
This commit is contained in:
Rob Shearman 2009-11-29 10:18:01 +00:00 committed by Alexandre Julliard
parent db077e11ad
commit db33e8fdd9
1 changed files with 1 additions and 1 deletions

View File

@ -1048,7 +1048,7 @@ int FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
TRACE("%s, %p\n", debugstr_w(str), *stringTable);
strgtable = CoTaskMemAlloc(len*sizeof(*strgtable));
strgtable = CoTaskMemAlloc((len + 1)*sizeof(*strgtable));
if (strgtable==NULL)
return E_OUTOFMEMORY;