X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-delta.c;h=b2ae7b5e6c3b4aa409ccfa60f67d5c8eb1690504;hb=b5c367f75c2990650119749a1add5216871ca47a;hp=67f60814b714493568add5a92df4a8acf8085a14;hpb=69a2d426f0d249bca2c6f754b3c1283c0fa72fd4;p=git.git diff --git a/diff-delta.c b/diff-delta.c index 67f60814..b2ae7b5e 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -306,12 +306,13 @@ void *diff_delta(void *from_buf, unsigned long from_size, *orig = i; } - /* next time around the largest possible output is 1 + 4 + 3 */ if (max_size && outpos > max_size) { free(out); delta_cleanup(&bdf); return NULL; } + + /* next time around the largest possible output is 1 + 4 + 3 */ if (outpos > outsize - 8) { void *tmp = out; outsize = outsize * 3 / 2;