From a012c2fb3efbac49b4333a62cfd7cc1df9ee6aef Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 26 May 2021 13:59:32 +0200 Subject: term: fix crash when an OSC-8 URI wraps around the scrollback Long OSC-8 URIs, that are split up over multiple rows, are handled by emitting one URI range on each row the URL touches. This was done by initializing a row index variable, and then incrementing it each loop iteration. This caused an out-of-bounds array access when the row index reached the maximum number of scrollback lines. The fix is simple: make sure the row index variable wraps around, instead of incrementing without any bounds. Closes #552 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index d0a7bc13..f15f47d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -133,6 +133,8 @@ * Regression where `+shift+tab` always produced `\E[Z` instead of the correct `\E[27;;9~` sequence (https://codeberg.org/dnkl/foot/issues/547). +* Crash when a line wrapping OSC-8 URI crossed the scrollback wrap + around (https://codeberg.org/dnkl/foot/issues/552). ### Security -- cgit v1.3