mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Sync OpenBSD patchset 1099:
Do not return a buffer on the stack, mentioned by jsg a while ago.
This commit is contained in:
		
							
								
								
									
										6
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								cmd.c
									
									
									
									
									
								
							@@ -1324,8 +1324,10 @@ find_home:
 | 
			
		||||
		return (s->cwd);
 | 
			
		||||
 | 
			
		||||
complete_path:
 | 
			
		||||
	if (root[skip] == '\0')
 | 
			
		||||
		return (root);
 | 
			
		||||
	if (root[skip] == '\0') {
 | 
			
		||||
		strlcpy(path, root, sizeof path);
 | 
			
		||||
		return (path);
 | 
			
		||||
	}
 | 
			
		||||
	n = snprintf(path, sizeof path, "%s/%s", root, cwd + skip);
 | 
			
		||||
	if (n > 0 && (size_t)n < sizeof path)
 | 
			
		||||
		return (path);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user