From f94bf44041f621bad3c99e02476540f4a120a90e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 3 Oct 2007 17:42:52 -0700 Subject: builtin-apply: fix conversion error in strbuf series Signed-off-by: Junio C Hamano --- builtin-apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1