Rob Shearman : ole32: Fix off-by-one error in FileMonikerImpl_DecomposePath .
Alexandre Julliard
julliard at winehq.org
Mon Nov 30 10:42:43 CST 2009
Module: wine
Branch: master
Commit: db33e8fdd9b2a24b1b35b86a0e3814fd98356810
URL: http://source.winehq.org/git/wine.git/?a=commit;h=db33e8fdd9b2a24b1b35b86a0e3814fd98356810
Author: Rob Shearman <robertshearman at 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;
More information about the wine-cvs
mailing list