Files
systemd/src
Chris Down 0a66431031 string-util: Prevent infinite loop pegging CPU on malformed ESC input
string_has_ansi_sequence() currently does this to look for ESC input:

    t = memchr(s, 0x1B, ...)

So each iteration re-searches from the original start pointer. But if we
find an ESC byte that does *not* start a valid ANSI sequence (like "\x1B
", or an ESC at the end of the string), then ansi_sequence_length()
returns 0, and if that ESC is still in the search window, we will just
spin consuming 100% CPU forever.

Fix this by always advancing past rejected ESC bytes.
2026-02-14 21:49:24 +01:00
..
2026-01-21 15:09:46 +01:00
2026-02-11 11:46:12 +01:00
2026-02-11 11:47:59 +01:00
2025-12-15 08:50:13 +09:00
2025-12-15 08:50:13 +09:00
2026-02-14 04:58:50 +09:00
…
2026-02-14 04:58:50 +09:00
2025-12-18 13:57:32 +01:00
2026-02-11 11:46:44 +01:00
2026-02-11 11:47:18 +01:00
2026-01-06 08:45:22 +09:00
2026-02-11 15:31:37 +01:00
2026-02-14 04:58:50 +09:00
…
2026-02-09 11:01:15 +01:00
2026-02-05 14:14:40 +01:00
2025-12-01 16:18:11 +01:00
2026-02-04 11:43:22 +09:00
2026-01-16 13:07:47 +01:00