summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-24 15:06:10 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-05-02 18:53:36 +0200
commit00ff43f12d6ecb811b48d4d235fd4ddc9922d0f0 (patch)
tree25b800b1ff7dd3c01f9520747fbc99f8206bbfba
parentc4ad6a24329446b374a7f01ab9a2214219d3590e (diff)
ofz#1220 sanitize nTyp to legal values
Change-Id: Iad71c4f79dbe03e2e325453eb0506a2d92d67c2d Reviewed-on: https://gerrit.libreoffice.org/36895 Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-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;
}