summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-24 11:28:47 +0100
committerAndras Timar <andras.timar@collabora.com>2017-11-27 12:55:07 +0100
commit43a596299257a379bdae7dd16f7f6b03f4c89446 (patch)
treed034f68f312712204cf6f1e6297077d7aa093d66 /filter
parentf92b0035e615b261c3fcf30ed3cdf2dae31241ca (diff)
ofz#3759 check for valid starting dash index
Change-Id: I09e117e14eda2565c9b25d407cc4328d4f2ee97a Reviewed-on: https://gerrit.libreoffice.org/43802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 2851316853b6c9106d9dc89a8ea4c3ca42eab01e)
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/idxf/dxftblrd.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx
index 1d2f8b483428..a7b968de6db3 100644
--- a/filter/source/graphicfilter/idxf/dxftblrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxftblrd.cxx
@@ -68,9 +68,14 @@ void DXFLType::Read(DXFGroupReader & rDGR)
rDGR.SetError();
return;
}
- if (nDashIndex<nDashCount)
+ if (nDashIndex < nDashCount)
{
- fDash[nDashIndex++]=rDGR.GetF();
+ if (nDashIndex < 0)
+ {
+ rDGR.SetError();
+ return;
+ }
+ fDash[nDashIndex++] = rDGR.GetF();
}
break;
}