summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2025-03-20 00:41:00 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2025-03-20 06:10:04 +0100
commit78a66f99958ed258686cb2fac90f361954b5afe4 (patch)
tree157b3ce88906d80f4a43101c2fdfe09f10616de0 /basegfx/source
parent1d8ff7bd62249ad0f825eaca18ea524d9d7c6c2e (diff)
tdf#165821: don't change range of ScCellIterator outside of wanted bounds
Commit 8e3a29110c8ad739bedeea90932663608d8d3935 (ofz#20904 check bounds, 2020-02-29) workarounded an out-of-bounds access, by changing maStartPos to be in the allocated range. But that meant that functions that wanted the data from some specific range, got the data from another. Fix this by looking for table in the wanted range that has the allocated columns in the wanted range (cf. to ScCellIterator::getCurrent(), which skips the unallocated area altogether). If no tables have such columns, just initialize maCurPos with an unvalid table, which causes first() to return false (the same as with invalid tables). No idea how to make a unit test for this. Adding a formula like =COUNTA(ABC:ABC) to the end of sc/qa/unit/data/functions/statistical/fods/counta.fods, with expected value of 0, doesn't fail without the fix. Change-Id: I570cf4a11a410b4e79eb4df785d6c52897973b6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183141 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'basegfx/source')
0 files changed, 0 insertions, 0 deletions