summaryrefslogtreecommitdiff
path: root/src/apply.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apply.c')
-rw-r--r--src/apply.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apply.c b/src/apply.c
index 10bf1f492..f05fc7c2f 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -293,6 +293,11 @@ static int apply_binary(
git_buf reverse = GIT_BUF_INIT;
int error;
+ if (patch->binary.empty_data) {
+ error = apply_err("patch does not contain binary data");
+ goto done;
+ }
+
/* first, apply the new_file delta to the given source */
if ((error = apply_binary_delta(out, source, source_len,
&patch->binary.new_file)) < 0)