[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Wed Oct 25 07:53:57 UTC 2017


 filter/source/graphicfilter/idxf/dxftblrd.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit cd0030e5d6ee7042c3e42028dc1e1d869493d52a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 24 11:28:47 2017 +0100

    ofz#3759 check for valid starting dash index
    
    Change-Id: I09e117e14eda2565c9b25d407cc4328d4f2ee97a
    Reviewed-on: https://gerrit.libreoffice.org/43751
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
         }


More information about the Libreoffice-commits mailing list