Merge branch 'jc/xstrfmt-null-with-prec-0'
* jc/xstrfmt-null-with-prec-0: setup.c: do not feed NULL to "%.*s" even with precision 0
This commit is contained in:
		
							
								
								
									
										2
									
								
								setup.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.c
									
									
									
									
									
								
							| @ -102,7 +102,7 @@ char *prefix_path_gently(const char *prefix, int len, | ||||
| 			return NULL; | ||||
| 		} | ||||
| 	} else { | ||||
| 		sanitized = xstrfmt("%.*s%s", len, prefix, path); | ||||
| 		sanitized = xstrfmt("%.*s%s", len, len ? prefix : "", path); | ||||
| 		if (remaining_prefix) | ||||
| 			*remaining_prefix = len; | ||||
| 		if (normalize_path_copy_len(sanitized, sanitized, remaining_prefix)) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Junio C Hamano
					Junio C Hamano