mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -1216,7 +1216,7 @@ std::string filterANSIEscapes(const std::string & s, unsigned int width)
|
|||
|
||||
else if (*i == '\r')
|
||||
// do nothing for now
|
||||
;
|
||||
i++;
|
||||
|
||||
else {
|
||||
t += *i++; w++;
|
||||
|
|
Loading…
Reference in a new issue