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

Caolán McNamara caolanm at redhat.com
Wed Apr 19 11:42:48 UTC 2017


 svl/source/numbers/zforscan.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 08cc4c64ed2d80ebae984463c1fb4c603b03e7d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 19 09:55:12 2017 +0100

    coverity#1405221 silence Out-of-bounds read
    
    Change-Id: I39b84b1d0272c2e8aa606e8b2e9ab0d2d88c3586
    Reviewed-on: https://gerrit.libreoffice.org/36671
    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/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 7ba86595b068..4bf7f4838604 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1703,6 +1703,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
                     {
                         sDiv += sStrArray[j++];
                     }
+                    assert(j > 0 && "if i is 0, first iteration through loop is guaranteed by surrounding if condition");
                     if (OUString::number(sDiv.toInt32()) == sDiv)
                     {
                         // Found a Divisor


More information about the Libreoffice-commits mailing list