diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/ppt/pass/hang-9.ppt | bin | 0 -> 7712 bytes | |||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 8 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sd/qa/unit/data/ppt/pass/hang-9.ppt b/sd/qa/unit/data/ppt/pass/hang-9.ppt Binary files differnew file mode 100644 index 000000000000..97e0158ac9ea --- /dev/null +++ b/sd/qa/unit/data/ppt/pass/hang-9.ppt diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 8c2d75d04adb..d37855d59f1b 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -733,11 +733,17 @@ bool ImplSdPPTImport::Import() PptSlidePersistEntry* pE = pPersist; while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId ) { - sal_uInt16 nNextMaster = m_pMasterPages->FindPage( pE->aSlideAtom.nMasterId ); + auto nOrigMasterId = pE->aSlideAtom.nMasterId; + sal_uInt16 nNextMaster = m_pMasterPages->FindPage(nOrigMasterId); if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND ) break; else pE = &(*pList)[ nNextMaster ]; + if (pE->aSlideAtom.nMasterId == nOrigMasterId) + { + SAL_WARN("filter.ms", "loop in atom chain"); + break; + } } SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, true ); // import background if ( pObj ) |