Control sequence `\e]104;x\a` hangs in libvte
Found at https://bugs.launchpad.net/ubuntu/+source/vte2.91/+bug/2022019, confirmed. Bug description copied from there:
The command:
$ printf '\e]104;x\a'
will cause either gnome-terminal or xfce4-terminal to enter an infinite loop inside libvte-2.91.so.0.
I believe the problem is in src/vteseq.cc
in the Terminal::reset_color
function:
while (token != endtoken) {
int value;
if (!token.number(value))
continue;
int index;
if (get_osc_color_index(osc, value, index) &&
index != -1) {
reset_color(index, VTE_COLOR_SOURCE_ESCAPE);
}
++token;
}
When token
doesn't point to a valid number, then continue
bypasses the ++token
line and will just re-parse the same token
over again.
Edited by Egmont Koblinger