git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin-apply: fix conversion error in strbuf series

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 4, 2007, 00:53 UTC
Message-ID
<7v7im3d7iy.fsf@gitster.siamese.dyndns.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin-apply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index 047a60d..05c6bc3 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)
-- 
1.5.3.4.1150.gbb28
Message 1 of 1 in “builtin-apply: fix conversion error in strbuf series”
  1. builtin-apply: fix conversion error in strbuf seriesJunio C Hamano, Oct 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.