diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-22 21:46:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-22 21:46:47 +0000 |
commit | d608a304ecd3be4481632dbad091279abcf07a02 (patch) | |
tree | 6160b117893ba4c5f52d046b81cec0cbe082b34c /vcl | |
parent | 35c602a5f47d6bd0e9538b4ffd8216ecccd27e02 (diff) |
return early on not good
Change-Id: I4aca6cb1c3dae652595b93ff7507db713a668d5f
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/sgfbram.cxx | 2 |
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)) { |