combine-diff: fix loop index underflow
commite5e9b56528294e9455d22d1abb21ad32f098a1be
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 24 Mar 2012 15:18:46 +0000 (24 16:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Mar 2012 04:35:52 +0000 (25 21:35 -0700)
tree12c6a871b24c161b553e7c32afa9a8d5fbbba716
parent4baff50551545e2b6825973ec37bcaf03edb95fe
combine-diff: fix loop index underflow

If both la and context are zero at the start of the loop, la wraps around
and we end up reading from memory far away.  Skip the loop in that case
instead.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combine-diff.c