diffcore-break.c: check diff_delta() return value.
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>maint
parent
b825e6ff5d
commit
d28c8af623
|
|
@ -66,6 +66,8 @@ static int should_break(struct diff_filespec *src,
|
||||||
delta = diff_delta(src->data, src->size,
|
delta = diff_delta(src->data, src->size,
|
||||||
dst->data, dst->size,
|
dst->data, dst->size,
|
||||||
&delta_size, 0);
|
&delta_size, 0);
|
||||||
|
if (!delta)
|
||||||
|
return 0; /* error but caught downstream */
|
||||||
|
|
||||||
/* Estimate the edit size by interpreting delta. */
|
/* Estimate the edit size by interpreting delta. */
|
||||||
if (count_delta(delta, delta_size,
|
if (count_delta(delta, delta_size,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue