summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sax/source/expatwrap/sax_expat.cxx15
-rw-r--r--sw/qa/core/data/odt/fail/c2dfc5bd-8366-40e7-b862-55e13fdc52dc.odtbin0 -> 2544 bytes
-rw-r--r--sw/qa/core/data/odt/fail/tdf102018.odt (renamed from sw/qa/core/data/odt/pass/tdf102018.odt)bin2851 -> 2851 bytes
3 files changed, 10 insertions, 5 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index ba87c6f9e146..dfe2246eec19 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -670,18 +670,23 @@ void SaxExpatParser_Impl::parse( )
while( nRead ) {
nRead = getEntity().converter.readAndConvert( seqOut , nBufSize );
+ bool bContinue(false);
+
if( ! nRead ) {
- XML_Parse( getEntity().pParser ,
+ // last call - must return OK
+ XML_Status const ret = XML_Parse( getEntity().pParser,
reinterpret_cast<const char *>(seqOut.getConstArray()),
0 ,
1 );
- break;
- }
-
- bool bContinue = ( XML_Parse( getEntity().pParser ,
+ if (ret == XML_STATUS_OK) {
+ break;
+ }
+ } else {
+ bContinue = ( XML_Parse( getEntity().pParser,
reinterpret_cast<const char *>(seqOut.getConstArray()),
nRead,
0 ) != XML_STATUS_ERROR );
+ }
if( ! bContinue || this->bExceptionWasThrown ) {
diff --git a/sw/qa/core/data/odt/fail/c2dfc5bd-8366-40e7-b862-55e13fdc52dc.odt b/sw/qa/core/data/odt/fail/c2dfc5bd-8366-40e7-b862-55e13fdc52dc.odt
new file mode 100644
index 000000000000..7cafa8d5e19b
--- /dev/null
+++ b/sw/qa/core/data/odt/fail/c2dfc5bd-8366-40e7-b862-55e13fdc52dc.odt
Binary files differ
diff --git a/sw/qa/core/data/odt/pass/tdf102018.odt b/sw/qa/core/data/odt/fail/tdf102018.odt
index d804aec11df0..d804aec11df0 100644
--- a/sw/qa/core/data/odt/pass/tdf102018.odt
+++ b/sw/qa/core/data/odt/fail/tdf102018.odt
Binary files differ