James Hawkins : ole32: StorageImpl_GetROBigBlock can return NULL so check for NULL before doing a memcpy .

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 5 12:11:13 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 2b5963f8e2959e8c4a6735cb70e1489503539ac1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=2b5963f8e2959e8c4a6735cb70e1489503539ac1

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Apr 28 20:16:41 2006 -0500

ole32: StorageImpl_GetROBigBlock can return NULL so check for NULL before doing a memcpy.

---

 dlls/ole32/storage32.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 5e6696c..a3f21d5 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -4493,6 +4493,8 @@ BOOL BlockChainStream_ReadAt(BlockChainS
      */
     bigBlockBuffer =
       StorageImpl_GetROBigBlock(This->parentStorage, blockIndex);
+    if (!bigBlockBuffer)
+        return FALSE;
 
     memcpy(bufferWalker, bigBlockBuffer + offsetInBlock, bytesToReadInBuffer);
 




More information about the wine-cvs mailing list