[Libreoffice-commits] core.git: editeng/source

Michael Stahl mstahl at redhat.com
Tue Aug 22 19:57:49 UTC 2017


 editeng/source/items/frmitems.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f2a56f91e0057ad502b4586714eb3c14fc069af
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 22 17:22:32 2017 +0200

    editeng: avoid infinite loop in SvxBoxItem::Create
    
    Apparently a sw unit test randomly read a partially written autotbl.fmt
    and the stream has m_isEof = true.
    
    Change-Id: Iacfbc42e83be6320d4aa695a5df4264f1db0b021

diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index dc506afa7d4e..fb3d120d8ab7 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -2038,7 +2038,7 @@ SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
                            SvxBoxItemLine::RIGHT, SvxBoxItemLine::BOTTOM };
 
     sal_Int8 cLine;
-    while( true )
+    while (rStrm.good())
     {
         rStrm.ReadSChar( cLine );
 


More information about the Libreoffice-commits mailing list