[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/qa filter/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 17 04:07:17 PDT 2015
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 e5aae767d634ba7efc8a5ecf2889678176babeb8
Author: Caolán McNamara <caolanm at 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/17121
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at 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 6621edd..4f0c39b 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1859,6 +1859,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;
@@ -1950,6 +1951,10 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
pPict->SetEndian(nOrigNumberFormat);
if (pPict->GetError()) pPict->Seek(nOrigPos);
+ } catch (...)
+ {
+ rStreamPict.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ }
}
namespace pict {
More information about the Libreoffice-commits
mailing list