From f7456c3e858c91783cef153b6567ab4fb4c5b8fa Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 18 Nov 2009 10:27:16 -0600 Subject: [PATCH 4/6] ole32: Use safe list iteration when searching for streams to invalidate. --- dlls/ole32/storage32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 96e3e00..4cfc76f 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1903,10 +1903,10 @@ static HRESULT deleteStreamContents( IStream *pis; HRESULT hr; ULARGE_INTEGER size; - StgStreamImpl *strm; + StgStreamImpl *strm, *strm2; /* Invalidate any open stream objects. */ - LIST_FOR_EACH_ENTRY(strm, &parentStorage->strmHead, StgStreamImpl, StrmListEntry) + LIST_FOR_EACH_ENTRY_SAFE(strm, strm2, &parentStorage->strmHead, StgStreamImpl, StrmListEntry) { if (strm->dirEntry == indexToDelete) { -- 1.6.3.3