Rob Shearman : ole32: Fix off-by-one error in FileMonikerImpl_DecomposePath .
Module: wine Branch: master Commit: db33e8fdd9b2a24b1b35b86a0e3814fd98356810 URL: http://source.winehq.org/git/wine.git/?a=commit;h=db33e8fdd9b2a24b1b35b86a0e... Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Nov 29 10:18:01 2009 +0000 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. --- dlls/ole32/filemoniker.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index ff543aa..72f5913 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;
participants (1)
-
Alexandre Julliard