Robert Shearman : ole32: Check the return value of IStream_SetSize so as to not blindly continue on and possibly corrupt the structured storage file .
Module: wine Branch: master Commit: 3721bf60bb4c49c7a57205b5621faab87df3d68f URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3721bf60bb4c49c7a57205b5... Author: Robert Shearman <rob(a)codeweavers.com> Date: Wed Sep 27 15:51:13 2006 +0100 ole32: Check the return value of IStream_SetSize so as to not blindly continue on and possibly corrupt the structured storage file. --- dlls/ole32/stg_stream.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 32061a1..c66fa65 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -415,7 +415,9 @@ static HRESULT WINAPI StgStreamImpl_Writ if (newSize.u.LowPart > This->streamSize.u.LowPart) { /* grow stream */ - IStream_SetSize(iface, newSize); + res = IStream_SetSize(iface, newSize); + if (FAILED(res)) + return res; } /*
participants (1)
-
Alexandre Julliard