Skip to content

fix some parse_commit segfaults

Jeff King git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6log_tree_diff: die when we fail to parse a commitcommit.c commit.h log-tree.c+11 -30 replies
2/6assume parse_commit checks commit->object.parsedbuiltin/blame.c builtin/name-rev.c builtin/show-branch.c +1 more+6 -110 replies
3/6assume parse_commit checks for NULL commitbuiltin/branch.c builtin/commit.c commit.c +2 more+5 -70 replies
4/6use parse_commit_or_die instead of segfaultingbuiltin/checkout.c builtin/fast-export.c+4 -40 replies
5/6use parse_commit_or_die instead of custom messageshallow.c upload-pack.c+2 -40 replies
6/6checkout: do not die when leaving broken detached HEADbuiltin/checkout.c+4 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] fix some parse_commit segfaults

This is a repost of the series here:

http://thread.gmane.org/gmane.comp.version-control.git/235735/focus=235826

(the original was a single patch, followed by a 5-patch series, which I've combined here). It's mostly a cleanup, since parse_commit will only fail in corrupted repos, but I did run into it in a real (corrupted) repo.

[1/6]: log_tree_diff: die when we fail to parse a commit [2/6]: assume parse_commit checks commit->object.parsed [3/6]: assume parse_commit checks for NULL commit [4/6]: use parse_commit_or_die instead of segfaulting [5/6]: use parse_commit_or_die instead of custom message [6/6]: checkout: do not die when leaving broken detached HEAD

-Peff