mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										3
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								format.c
									
									
									
									
									
								
							@@ -1272,6 +1272,7 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
 | 
			
		||||
 | 
			
		||||
	/* Make a copy of the key. */
 | 
			
		||||
	copy = copy0 = xstrndup(key, keylen);
 | 
			
		||||
	log_debug("%s: format = '%s'", __func__, copy);
 | 
			
		||||
 | 
			
		||||
	/* Process modifier list. */
 | 
			
		||||
	list = format_build_modifiers(ft, ©, &count);
 | 
			
		||||
@@ -1338,7 +1339,6 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
 | 
			
		||||
				cmp = fm;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	log_debug("%s: remaining = '%s'", __func__, copy);
 | 
			
		||||
 | 
			
		||||
	/* Is this a literal string? */
 | 
			
		||||
	if (modifiers & FORMAT_LITERAL) {
 | 
			
		||||
@@ -1468,6 +1468,7 @@ done:
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Expand the buffer and copy in the value. */
 | 
			
		||||
	log_debug("%s: '%s' -> '%s'", __func__, copy0, value);
 | 
			
		||||
	valuelen = strlen(value);
 | 
			
		||||
	while (*len - *off < valuelen + 1) {
 | 
			
		||||
		*buf = xreallocarray(*buf, 2, *len);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user