From 333ec5789a01dfc165598ade66de518132c64865 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 9 Oct 2013 16:32:39 +0100 Subject: CID#736180 out of bounds Change-Id: I2e775a49a1c852053e3c7996381f20d3eda1189c --- lotuswordpro/source/filter/lwptoc.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index ef4af4549ca3..8e802a6463e2 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -353,6 +353,9 @@ sal_Bool LwpTocSuperLayout::GetUsePageNumber(sal_uInt16 index) */ sal_uInt16 LwpTocSuperLayout::GetSeparatorType(sal_uInt16 index) { + if (index >= MAX_LEVELS) + return NONE; + sal_uInt16 Flag = (sal_uInt16)m_nFlags[index]; if (Flag & TS_LEADERDOTS) -- cgit