[2/4] dlls/ole32: Zero out returned stats when IEnumSTATSTG::Next reaches end of enumeration. Resend.

Dmitry Timoshkov dmitry at baikal.ru
Sun Nov 1 21:34:41 CST 2015


Checking a theory that zeroing should be done for the whole set of remaining
elements requires separate tests (and fixes if proved).

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/ole32/storage32.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 4d775b4..f75e097 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -1031,7 +1031,10 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
     hr = IEnumSTATSTGImpl_GetNextRef(This, &currentSearchNode);
 
     if (FAILED(hr) || currentSearchNode == DIRENTRY_NULL)
+    {
+      memset(currentReturnStruct, 0, sizeof(*currentReturnStruct));
       break;
+    }
 
     /*
      * Read the entry from the storage.
-- 
2.6.2




More information about the wine-patches mailing list