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…
	
	Add table
		Add a link
		
	
		Reference in a new issue