Skip to content

Commit 3a244c6

Browse files
authored
Merge pull request #7052 from QiuYitai/main
Fix the null reference vulnerability.
2 parents 4e7a7e0 + ee00230 commit 3a244c6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/libgit2/checkout/checkout_helpers.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ int checkout_count_callback(
9090
if (ct->debug) {
9191
if (workdir)
9292
fprintf(stderr, "M %s\n", workdir->path);
93-
else
93+
else if (baseline)
9494
fprintf(stderr, "D %s\n", baseline->path);
95+
else
96+
fprintf(stderr, "invalid notification - no workdir or baseline path\n");
9597
}
9698
}
9799

0 commit comments

Comments
 (0)