diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-19 09:55:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-19 13:42:23 +0200 |
commit | 08cc4c64ed2d80ebae984463c1fb4c603b03e7d4 (patch) | |
tree | d45f5b4bbc466c7f450c980e1eeb2a6459f3fae3 /svl | |
parent | 2b83e73fd7b059c4ad224e3163f9d57c6cc6e1c7 (diff) |
coverity#1405221 silence Out-of-bounds read
Change-Id: I39b84b1d0272c2e8aa606e8b2e9ab0d2d88c3586
Reviewed-on: https://gerrit.libreoffice.org/36671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
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 |