diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 11:28:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-25 09:53:37 +0200 |
commit | cd0030e5d6ee7042c3e42028dc1e1d869493d52a (patch) | |
tree | f3e6d21983265325f3c6f85bfb0b7baffcd8b975 | |
parent | 78a535a7a717320693a3bbff3679b36f0e0ae507 (diff) |
ofz#3759 check for valid starting dash index
Change-Id: I09e117e14eda2565c9b25d407cc4328d4f2ee97a
Reviewed-on: https://gerrit.libreoffice.org/43751
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | filter/source/graphicfilter/idxf/dxftblrd.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx index cf97c5d9e58f..fe22ca27caa0 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; } |