mirror of
https://github.com/git/git.git
synced 2025-03-13 14:56:04 +00:00
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>
This commit is contained in:
parent
b825e6ff5d
commit
d28c8af623
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user