projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b825e6f
)
diffcore-break.c: check diff_delta() return value.
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>
diffcore-break.c
patch
|
blob
|
history
diff --git
a/diffcore-break.c
b/diffcore-break.c
index
06f9a7f
..
e6a468e
100644
(file)
--- a/
diffcore-break.c
+++ b/
diffcore-break.c
@@
-66,6
+66,8
@@
static int should_break(struct diff_filespec *src,
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,