mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-03 21:50:26 +00:00
patch parsing: ensure empty patches are illegal
This commit is contained in:
parent
5d17d72621
commit
8d2eef27ff
@ -394,3 +394,11 @@ void test_apply_fromfile__binary_change_must_be_reversible(void)
|
||||
NULL, 0,
|
||||
PATCH_BINARY_NOT_REVERSIBLE, NULL, 0));
|
||||
}
|
||||
|
||||
void test_apply_fromfile__empty_file_not_allowed(void)
|
||||
{
|
||||
git_patch *patch;
|
||||
|
||||
cl_git_fail(git_patch_from_patchfile(&patch, "", 0));
|
||||
cl_git_fail(git_patch_from_patchfile(&patch, NULL, 0));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user