提交 d28c8af6 编写于 作者: J Junio C Hamano 提交者: Junio C Hamano

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: NJunio C Hamano <junio@twinsun.com>
上级 b825e6ff
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册