[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 22 12:20:09 UTC 2020
sc/source/filter/qpro/qpro.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit a7d1d107ec58d3b00b4019c89edddcff71ca6ff3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 22 09:53:11 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 22 13:19:15 2020 +0100
oss-fuzz: qpwfuzzer doesn't pass sanity check
Step #5: #6 0x9d06d2f in __cxa_throw (/tmp/not-out/qpwfuzzer+0x9d06d2f)
Step #5: #7 0x476ab6a in SvStream::ReadUInt16(unsigned short&) (/tmp/not-out/qpwfuzzer+0x476ab6a)
Step #5: #8 0x512b10 in ScQProReader::nextRecord() (/tmp/not-out/qpwfuzzer+0x512b10)
Step #5: #9 0x513a7e in ScQProReader::parse(ScDocument&) (/tmp/not-out/qpwfuzzer+0x513a7e)
Step #5: #10 0x514bdc in TestImportQPW (/tmp/not-out/qpwfuzzer+0x514bdc)
Change-Id: I42ea56988bcb54a57979535108e5ed90225d1f68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108149
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 2b7641696644..af3544967711 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -254,7 +254,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportQPW(SvStream &rStream)
aDocument.SetHardRecalcState(ScDocument::HardRecalcState::ETERNAL);
ScQProReader aReader(&rStream);
- ErrCode eRet = aReader.parse(aDocument);
+
+ ErrCode eRet;
+ try
+ {
+ eRet = aReader.parse(aDocument);
+ }
+ catch (SvStreamEOFException&)
+ {
+ eRet = SCERR_IMPORT_OPEN;
+ }
return eRet == ERRCODE_NONE;
}
More information about the Libreoffice-commits
mailing list