diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-27 14:06:04 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-08-28 11:32:55 +0000 |
commit | 9becbb6a1bf32ab3fa0afeaa35bcdd0a0cd33116 (patch) | |
tree | 56bc9f38f300825ffb10ce516ca9726ceae30094 | |
parent | ec08cc64c8bbf7ff9dcbd4f4e660c42a7885947b (diff) |
check stream state after read attempt
Change-Id: Ie3836f2e95acab963634181a07565343501f00f8
(cherry picked from commit 9a695e071020639926f8b038aba64eb016a1801a)
Reviewed-on: https://gerrit.libreoffice.org/18079
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/data/ppt/pass/hang-8.ppt | bin | 0 -> 7712 bytes |
2 files changed, 5 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 2eeb4b01226a..40c3349c0a2b 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5245,9 +5245,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con 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; @@ -5314,7 +5318,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con 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 Binary files differnew file mode 100644 index 000000000000..0f52bd5d249d --- /dev/null +++ b/sd/qa/unit/data/ppt/pass/hang-8.ppt |