justify range to prevent negative tab span and memory alloc, rhbz#1057741
I could not reproduce the crash of that bug (probably having more memory available), but the backtrace had nTabSpan = -2 implicitly casted to size_t leading to allocation of a huge amount of memory with vector::reserve(), which ScRange::Justify() exactly prevents. Change-Id: Idb79e1be62649922ba793cab01e00011479fade9
This commit is contained in:
parent
c80c70c8c3
commit
a45fde7235
1 changed files with 1 additions and 0 deletions
|
@ -2078,6 +2078,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSr
|
|||
}
|
||||
|
||||
ScRange aRange(rRange);
|
||||
aRange.Justify();
|
||||
SCTAB nTabSpan = aRange.aEnd.Tab() - aRange.aStart.Tab();
|
||||
|
||||
vector<ScExternalRefCache::SingleRangeData> aCacheData;
|
||||
|
|
Loading…
Reference in a new issue