sc/source/core/data/queryiter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 05dba1a1236c662664d73bff322e4a54036f0860 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 18 11:07:57 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Aug 18 15:08:51 2022 +0200 cid#1509312 Unintentional integer overflow Change-Id: I93ca395f6a74dd6c67d4388512b5de3441b362fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/data/queryiter.cxx b/sc/source/core/data/queryiter.cxx index 36272b95bcbf..5d8a3695f7d1 100644 --- a/sc/source/core/data/queryiter.cxx +++ b/sc/source/core/data/queryiter.cxx @@ -1444,8 +1444,8 @@ sal_uInt64 ScCountIfCellIterator< ScQueryCellIteratorAccess::SortedCache >::GetC if( maParam.GetEntry(0).GetQueryItem().mbMatchEmpty && maParam.nCol2 >= rDoc.GetAllocatedColumnsCount( nTab )) { - count += (maParam.nCol2 - rDoc.GetAllocatedColumnsCount( nTab )) - * ( maParam.nRow2 - maParam.nRow1 + 1 ); + const sal_uInt64 nRows = maParam.nRow2 - maParam.nRow1 + 1; + count += (maParam.nCol2 - rDoc.GetAllocatedColumnsCount(nTab)) * nRows; } return count; }