diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index ff543aa7f7..72f59136f7 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -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;