[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-7' - sw/source

Caolán McNamara caolanm at redhat.com
Tue Apr 25 12:51:57 UTC 2017


 sw/source/filter/ww8/ww8graf.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3673a864c29bf0f65a5b7d69c7544ba054d01381
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 24 15:06:10 2017 +0100

    ofz#1220 sanitize nTyp to legal values
    
    Change-Id: Iad71c4f79dbe03e2e325453eb0506a2d92d67c2d
    Reviewed-on: https://gerrit.libreoffice.org/36894
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 72ee4ea7d805..eff857945ee2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1301,7 +1301,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
     else                                                // nein -> Nimm Linie
         SetStdAttr( rSet, aCallB.dpPolyLine.aLnt, aCallB.dptxbx.aShd );
     SetFill( rSet, aCallB.dptxbx.aFill );
-    rSet.Put( SdrCaptionTypeItem( aCaptA[nTyp] ) );
+    rSet.Put(SdrCaptionTypeItem(aCaptA[nTyp % SAL_N_ELEMENTS(aCaptA)]));
 
     return pObj;
 }


More information about the Libreoffice-commits mailing list