summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-27 14:06:04 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-28 11:32:29 +0000
commitd604263ea184c16ce2b23fd3fcfa823ab1ff62a5 (patch)
treeb925996f0880ca9fe283c3df58cd34e8bc874980
parent61542931de7abe69a459f3e59513e330ecf47211 (diff)
check stream state after read attempt
Change-Id: Ie3836f2e95acab963634181a07565343501f00f8 (cherry picked from commit 9a695e071020639926f8b038aba64eb016a1801a) Reviewed-on: https://gerrit.libreoffice.org/18092 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--filter/source/msfilter/svdfppt.cxx6
-rw-r--r--sd/qa/unit/data/ppt/pass/hang-8.pptbin0 -> 7712 bytes
2 files changed, 5 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 29f0b36215cd..0ac8030d4285 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5252,9 +5252,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
PPTCharPropSet aCharPropSet( nCurrentPara );
if ( bTextPropAtom )
+ {
ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
nBuBlip, nHasAnm, nAnmScheme );
+ if (!rIn.good())
+ break;
+ }
else
nCharCount = nStringLen;
@@ -5330,7 +5334,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
break;
}
}
- }
+ }
if ( !aCharPropList.empty() && ( aCharPropList.back()->mnParagraph != nCurrentPara ) )
{
PPTCharPropSet* pCharPropSet = new PPTCharPropSet( *aCharPropList.back(), nCurrentPara );
diff --git a/sd/qa/unit/data/ppt/pass/hang-8.ppt b/sd/qa/unit/data/ppt/pass/hang-8.ppt
new file mode 100644
index 000000000000..0f52bd5d249d
--- /dev/null
+++ b/sd/qa/unit/data/ppt/pass/hang-8.ppt
Binary files differ