Module: wine Branch: refs/heads/master Commit: 2b5963f8e2959e8c4a6735cb70e1489503539ac1 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2b5963f8e2959e8c4a6735cb...
Author: James Hawkins truiken@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);