filter/qa/cppunit/data/pict/fail/exception-1.pct |binary filter/source/graphicfilter/ipict/ipict.cxx | 5 +++++ 2 files changed, 5 insertions(+)
New commits: commit dc32feb2548aa557a8be6474986fc636d23c4e06 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jul 16 10:01:24 2015 +0100 exception on div by 0 Change-Id: Id33d6a5e3df5812babd28ebfc65b95ce97219ad3 (cherry picked from commit cf4159e16c13a13d0bedccebb50bb08f1662bc1c) Reviewed-on: https://gerrit.libreoffice.org/17122 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/filter/qa/cppunit/data/pict/fail/exception-1.pct b/filter/qa/cppunit/data/pict/fail/exception-1.pct new file mode 100644 index 0000000..f9cd85a Binary files /dev/null and b/filter/qa/cppunit/data/pict/fail/exception-1.pct differ diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 852e69b..4f0e431 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -1837,6 +1837,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) { + try { sal_uInt16 nOpcode; sal_uInt8 nOneByteOpcode; sal_uLong nSize, nPercent, nLastPercent; @@ -1929,6 +1930,10 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) pPict->SetNumberFormatInt(nOrigNumberFormat); if (pPict->GetError()) pPict->Seek(nOrigPos); + } catch (...) + { + rStreamPict.SetError(SVSTREAM_FILEFORMAT_ERROR); + } } namespace pict {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits