Flatten ScRangeList::Join() recursion
Joining an existing list of identical ranges could end up in a very deep (but not infinite) recursion which could lead to stack exhaustion. Recursion is unnecessary if we re-enter the loop with the picked range. Continuing the loop as it was done after recursion isn't necessary either, to the contrary, as long as there is one join try the entire list again. Commit f6eefd96 pointed this out as the UBSan build runs with ulimit -s 8192 Change-Id: Ibbc542fc8ae6d1509744aa731771eb6e32a38841 Reviewed-on: https://gerrit.libreoffice.org/48360Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Showing
Please
register
or
sign in
to comment