stagit

static git page generator  https://git.ce9e.org
git clone https://git.ce9e.org/stagit.git

commit
0160d28c768c7ac3c4af5b96a76d9425f842e870
parent
0ea916a0e789ddcce8393985d87f8421198b7d28
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-09-07 04:13
fix segfault in git_commit_get_diff

Diffstat

M src/stagit.c.in 10 +++++-----

1 files changed, 5 insertions, 5 deletions


diff --git a/src/stagit.c.in b/src/stagit.c.in

@@ -172,11 +172,11 @@ git_commit_get_diff(git_diff **diff, git_commit *commit)
  172   172 
  173   173 	if (git_tree_lookup(&commit_tree, repo, git_commit_tree_id(commit)))
  174   174 		goto err;
  175    -1 	if (!git_commit_parent(&parent, commit, 0)) {
  176    -1 		if (git_tree_lookup(&parent_tree, repo, git_commit_tree_id(parent))) {
  177    -1 			parent = NULL;
  178    -1 			parent_tree = NULL;
  179    -1 		}
   -1   175 	if (git_commit_parent(&parent, commit, 0)) {
   -1   176 		parent = NULL;
   -1   177 	}
   -1   178 	if (parent && git_tree_lookup(&parent_tree, repo, git_commit_tree_id(parent))) {
   -1   179 		parent_tree = NULL;
  180   180 	}
  181   181 
  182   182 	if (git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION))