[PATCH] ole32: Add pointer check

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Mon Sep 25 20:12:52 CDT 2017


Fixes: https://bugs.winehq.org/show_bug.cgi?id=43779

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/ole32/storage32.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 2da7a99..51f178b 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -7267,6 +7267,8 @@ BlockChainStream* BlockChainStream_Construct(
   BlockChainStream* newStream;
 
   newStream = HeapAlloc(GetProcessHeap(), 0, sizeof(BlockChainStream));
+  if(!newStream)
+    return NULL;
 
   newStream->parentStorage           = parentStorage;
   newStream->headOfStreamPlaceHolder = headOfStreamPlaceHolder;
-- 
1.9.1




More information about the wine-patches mailing list