mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Do not loop forever if there is a nonprintable character in the format.
This commit is contained in:
		@@ -837,7 +837,8 @@ format_trim_left(const char *expanded, u_int limit)
 | 
				
			|||||||
				*out++ = *cp;
 | 
									*out++ = *cp;
 | 
				
			||||||
			width++;
 | 
								width++;
 | 
				
			||||||
			cp++;
 | 
								cp++;
 | 
				
			||||||
		}
 | 
							} else
 | 
				
			||||||
 | 
								cp++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	*out = '\0';
 | 
						*out = '\0';
 | 
				
			||||||
	return (copy);
 | 
						return (copy);
 | 
				
			||||||
@@ -883,7 +884,8 @@ format_trim_right(const char *expanded, u_int limit)
 | 
				
			|||||||
				*out++ = *cp;
 | 
									*out++ = *cp;
 | 
				
			||||||
			width++;
 | 
								width++;
 | 
				
			||||||
			cp++;
 | 
								cp++;
 | 
				
			||||||
		}
 | 
							} else
 | 
				
			||||||
 | 
								cp++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	*out = '\0';
 | 
						*out = '\0';
 | 
				
			||||||
	return (copy);
 | 
						return (copy);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user