Skip to content

guri: Improve performance of remove_dot_segments() algorithm

Sebastian Wilhelmi requested to merge (removed):main into main

Replace the remove_dot_segments algorithm with quadratic time complexity with the linear complexity RFC algorithm

The current remove_dot_segments algorithm has quadratic time complexity, which causes fuzzing to fail with certain large inputs.

Instead we can simply implement the pseudo algorithm from the actual RFC, which is linear and can still operate in place.

Closes: #2526 (closed)

Edited by Philip Withnall

Merge request reports