From bd91c127a3fd28c2de06b3bcd7b767c5b9e57874 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 16 May 2011 10:06:27 +0200 Subject: [PATCH] avoid array overrun --- sfx2/source/doc/docvor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 425470219a2c..4a81f92e2c4c 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -718,7 +718,7 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox, pChildIter = NextSibling(pChildIter); // If possible, fill in Items onDemand ++i; - if(p[i+1] != INDEX_IGNORE && + if(i < 2 && p[i+1] != INDEX_IGNORE && pChildIter->HasChildsOnDemand() && !GetModel()->HasChilds(pChildIter)) RequestingChilds(pChildIter);