summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-24 15:06:10 +0100
committerAndras Timar <andras.timar@collabora.com>2017-04-26 15:00:02 +0200
commit133972315b79174ee766ecb43eb2eedf137ab1be (patch)
treef09934450ebf19cb4ebb585ceb668230d38ecbe6
parent26f1ab7e4d8407834cb1d5c1339ac29552ba220d (diff)
ofz#1220 sanitize nTyp to legal values
Change-Id: Iad71c4f79dbe03e2e325453eb0506a2d92d67c2d Reviewed-on: https://gerrit.libreoffice.org/36892 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 2b014a80022215a72d22bb950b2ee350c123c401)
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 718faff1c16c..bd1a8ca64cad 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1294,7 +1294,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;
}