X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-delta.c;h=b2ae7b5e6c3b4aa409ccfa60f67d5c8eb1690504;hb=ed24928e122bad83e62d161087f806fa21c46a59;hp=cf5013896f6ea5efc35c9d7e90d076e4bf6328a5;hpb=962537a3eb03a118cf27d9d0da365a3216ed1caa;p=git.git diff --git a/diff-delta.c b/diff-delta.c index cf501389..b2ae7b5e 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -213,7 +213,7 @@ void *diff_delta(void *from_buf, unsigned long from_size, bdrecord_t *brec; bdfile_t bdf; - if (delta_prepare(from_buf, from_size, &bdf)) + if (!from_size || !to_size || delta_prepare(from_buf, from_size, &bdf)) return NULL; outpos = 0;