From 9f2bd8503d7fc65a194a12ec5b9245fb027e1ce1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 2 Nov 2015 11:34:41 +0800 Subject: [PATCH] ole32: Zero out returned stats when IEnumSTATSTG::Next reaches end of enumeration. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/ole32/storage32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 4d775b4defb..f75e0975e91 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1031,7 +1031,10 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next( hr = IEnumSTATSTGImpl_GetNextRef(This, ¤tSearchNode); if (FAILED(hr) || currentSearchNode == DIRENTRY_NULL) + { + memset(currentReturnStruct, 0, sizeof(*currentReturnStruct)); break; + } /* * Read the entry from the storage. -- 2.11.4.GIT