diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-27 14:22:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-27 14:45:03 +0100 |
commit | de71eae5807ff94c8eace0eccaabf1ffa08e77b6 (patch) | |
tree | 791d93d4667b04ad754448c4c34dac23f82b8dd0 /sd/source | |
parent | 9a695e071020639926f8b038aba64eb016a1801a (diff) |
avoid loops in atom chains
Change-Id: Icc40c0ee6c7d8d305cf7cc60cbf3e511c763aedd
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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 ) |