From: Junio C Hamano Date: Thu, 4 Oct 2007 00:42:52 +0000 (-0700) Subject: builtin-apply: fix conversion error in strbuf series X-Git-Tag: v1.5.4-rc0~385 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f94bf44041f621bad3c99e02476540f4a120a90e;p=git.git builtin-apply: fix conversion error in strbuf series Signed-off-by: Junio C Hamano --- diff --git a/builtin-apply.c b/builtin-apply.c index 047a60d1a..05c6bc359 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -2651,7 +2651,7 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof) patch = xcalloc(1, sizeof(*patch)); patch->inaccurate_eof = inaccurate_eof; - nr = parse_chunk(buf.buf + offset, buf.len, patch); + nr = parse_chunk(buf.buf + offset, buf.len - offset, patch); if (nr < 0) break; if (apply_in_reverse)