diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-12-06 19:24:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-12-07 08:14:37 +0100 |
commit | f414d986fc9caabb9aa0f85be6c23d0ec2bd49fc (patch) | |
tree | b142c15668f1e21d4977192a11d9db6b7e496374 /sc/source/core | |
parent | 8579b6e39ea30048ae7763f27d77e093b26e76dc (diff) |
signed-integer-overflow
...after 8406139062d9ffe1daed32aefe4e261c6c55d63e "process broadcasts for
adjacent cells together (tdf#119083)" during e.g.
CppunitTest_sc_ucalc_copypaste,
> sc/source/core/data/documen7.cxx:143:59: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Change-Id: If848747f6b004219475b39b48c6a3de086bd1ae7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126457
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 8bc85cd8a6a9a879c143d8defacc45967a0ac99e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126436
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/documen7.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index bf0d38cb4ec9..28941db7c6d9 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -140,10 +140,10 @@ bool ScDocument::BroadcastHintInternal( const ScHint& rHint ) const ScAddress address(rHint.GetStartAddress()); SvtBroadcaster* pLastBC = nullptr; // Process all broadcasters for the given row range. - for( SCROW nRow = address.Row(); nRow < address.Row() + rHint.GetRowCount(); ++nRow ) + for( SCROW nRow = 0; nRow < rHint.GetRowCount(); ++nRow ) { ScAddress a(address); - a.SetRow(nRow); + a.SetRow(address.Row() + nRow); SvtBroadcaster* pBC = GetBroadcaster(a); if ( pBC && pBC != pLastBC ) { |