summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--diffcore-pickaxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index de44adabf0..286919e714 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -14,6 +14,8 @@ static unsigned int contains(struct diff_filespec *one,
const char *data;
if (diff_populate_filespec(one, 0))
return 0;
+ if (!len)
+ return 0;
sz = one->size;
data = one->data;