Re: [PATCH 1/3] pretty.c: fix null pointer dereference
- From
Mirko Faina <mroik@delayed.space>
- Date
- Feb 24, 2026, 07:43 UTC
- Message-ID
- <aZ1VUDSc7LUDC-Ty@exploit>
- In-Reply-To
- <aZ1JND7sGspCJEoc@exploit>
Show 15 quoted lines
> void get_commit_format(const char *arg, struct rev_info *rev)
> {
> struct cmt_fmt_map *commit_format;
>
> rev->use_terminator = 0;
> if (!arg) {
> rev->commit_format = CMIT_FMT_DEFAULT;
> return;
> }
> if (skip_prefix(arg, "format:", &arg)) {
> save_user_format(rev, arg, 0);
> return;
> }
>
> if (!*arg || skip_prefix(arg, "tformat:", &arg) || strchr(arg, '%')) {Seeing how "arg" is being handled here I am now unsure if it is actually a bug.
CC'ing Jeff for clarifications
> save_user_format(rev, arg, 1); > return; > }