Unverified Commit 1f44079c by Edward Thomson Committed by GitHub

Merge pull request #5179 from pks-t/pks/patch-parse-free

patch_parse: fix segfault due to line containing static contents
parents e07dbc92 a613832e
......@@ -653,7 +653,7 @@ static int parse_hunk_body(
memset(line, 0x0, sizeof(git_diff_line));
line->content = ctx->parse_ctx.line;
line->content = git__strdup(ctx->parse_ctx.line);
line->content_len = ctx->parse_ctx.line_len;
line->content_offset = ctx->parse_ctx.content_len - ctx->parse_ctx.remain_len;
line->origin = eof_for_origin(last_origin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment