mirror of
				https://git.proxmox.com/git/libgit2
				synced 2025-10-31 04:26:55 +00:00 
			
		
		
		
	Catch invalid filenames in append_entry()
This prevents the index api from calling write_tree() with a bogus tree.
This commit is contained in:
		
							parent
							
								
									19af78bb36
								
							
						
					
					
						commit
						0d778b1a89
					
				| @ -374,6 +374,9 @@ static int append_entry( | ||||
| { | ||||
| 	git_tree_entry *entry; | ||||
| 
 | ||||
| 	if (!valid_entry_name(filename)) | ||||
| 		return tree_error("Failed to insert entry. Invalid name for a tree entry"); | ||||
| 
 | ||||
| 	entry = alloc_entry(filename); | ||||
| 	GITERR_CHECK_ALLOC(entry); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Scott J. Goldman
						Scott J. Goldman