From 169bed1e5e8364875f68a66e7576c6947a11903b Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Fri, 19 Dec 2014 17:11:26 +0600 Subject: [PATCH] ZVISION: Fix dereference after null check (CID 1257091) --- engines/zvision/sound/zork_raw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp index 78c851e1321..393f2eb6a9f 100644 --- a/engines/zvision/sound/zork_raw.cpp +++ b/engines/zvision/sound/zork_raw.cpp @@ -73,6 +73,9 @@ RawChunkStream::RawChunk RawChunkStream::readNextChunk(Common::SeekableReadStrea tmp.size = 0; tmp.data = NULL; + if (!stream) + return tmp; + if (stream && (stream->size() == 0 || stream->eos())) return tmp;