exception on div by 0
Change-Id: Id33d6a5e3df5812babd28ebfc65b95ce97219ad3
This commit is contained in:
BIN
filter/qa/cppunit/data/pict/fail/exception-1.pct
Normal file
BIN
filter/qa/cppunit/data/pict/fail/exception-1.pct
Normal file
Binary file not shown.
@@ -1859,6 +1859,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
|
|||||||
|
|
||||||
void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
|
void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
sal_uInt16 nOpcode;
|
sal_uInt16 nOpcode;
|
||||||
sal_uInt8 nOneByteOpcode;
|
sal_uInt8 nOneByteOpcode;
|
||||||
sal_uLong nSize, nPercent, nLastPercent;
|
sal_uLong nSize, nPercent, nLastPercent;
|
||||||
@@ -1950,6 +1951,10 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
|
|||||||
pPict->SetEndian(nOrigNumberFormat);
|
pPict->SetEndian(nOrigNumberFormat);
|
||||||
|
|
||||||
if (pPict->GetError()) pPict->Seek(nOrigPos);
|
if (pPict->GetError()) pPict->Seek(nOrigPos);
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
rStreamPict.SetError(SVSTREAM_FILEFORMAT_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace pict {
|
namespace pict {
|
||||||
|
Reference in New Issue
Block a user