summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-22 21:46:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-22 21:46:47 +0000
commitd608a304ecd3be4481632dbad091279abcf07a02 (patch)
tree6160b117893ba4c5f52d046b81cec0cbe082b34c /vcl
parent35c602a5f47d6bd0e9538b4ffd8216ecccd27e02 (diff)
return early on not good
Change-Id: I4aca6cb1c3dae652595b93ff7507db713a668d5f
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/sgfbram.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 20afdf0b094f..ed2a96175991 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -323,6 +323,8 @@ bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
nFileStart=rInp.Tell();
ReadSgfHeader( rInp, aHead );
+ if (!rIStream.good())
+ return false;
if (aHead.ChkMagic() && (aHead.Typ==SgfBitImag0 || aHead.Typ==SgfBitImag1 ||
aHead.Typ==SgfBitImag2 || aHead.Typ==SgfBitImgMo))
{