forked from lix-project/lix
libutil: Fix infinite loop in filterANSIEscapes on '\r'
E.g. nix-instantiate --eval -E 'abort "\r"' hangs. Found by afl-fuzz.
This commit is contained in:
parent
056d28a601
commit
1d0e42879f
|
@ -1216,7 +1216,7 @@ std::string filterANSIEscapes(const std::string & s, unsigned int width)
|
||||||
|
|
||||||
else if (*i == '\r')
|
else if (*i == '\r')
|
||||||
// do nothing for now
|
// do nothing for now
|
||||||
;
|
i++;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
t += *i++; w++;
|
t += *i++; w++;
|
||||||
|
|
Loading…
Reference in a new issue