summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b825e6f)
raw | patch | inline | side by side (parent: b825e6f)
author | Junio C Hamano <junio@twinsun.com> | |
Mon, 12 Dec 2005 20:50:40 +0000 (12:50 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 12 Dec 2005 20:57:25 +0000 (12:57 -0800) |
This bug caused Darrin Thompson to notice that our deltifier was
half broken and punting on an empty blob.
Signed-off-by: Junio C Hamano <junio@twinsun.com>
half broken and punting on an empty blob.
Signed-off-by: Junio C Hamano <junio@twinsun.com>
diffcore-break.c | patch | blob | history |
diff --git a/diffcore-break.c b/diffcore-break.c
index 06f9a7f0ee25891ff6f4dd9646e39cd4c8b105fd..e6a468e6b0371f77e139928cb963b2b7974b9132 100644 (file)
--- a/diffcore-break.c
+++ b/diffcore-break.c
delta = diff_delta(src->data, src->size,
dst->data, dst->size,
&delta_size, 0);
+ if (!delta)
+ return 0; /* error but caught downstream */
/* Estimate the edit size by interpreting delta. */
if (count_delta(delta, delta_size,