From: Adrian Ratiu <adrian.ratiu@collabora.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Emily Shaffer <emilyshaffer@google.com>,
correctmost <cmlists@sent.com>
Subject: Re: [PATCH][next] hook: check for NULL pointer before deref
Date: Fri, 09 Jan 2026 17:57:18 +0200 [thread overview]
Message-ID: <87ecnywzhd.fsf@collabora.com> (raw)
In-Reply-To: <aWEkCqABozBzT-QS@pks.im>
On Fri, 09 Jan 2026, Patrick Steinhardt <ps@pks.im> wrote:
> On Fri, Jan 09, 2026 at 05:35:28PM +0200, Adrian Ratiu wrote:
>> diff --git a/hook.c b/hook.c
>> index 35211e5ed7..c257bd3940 100644
>> --- a/hook.c
>> +++ b/hook.c
>> @@ -148,12 +148,11 @@ int run_hooks_opt(struct repository *r, const char *hook_name,
>> };
>> const char *const hook_path = find_hook(r, hook_name);
>> int ret = 0;
>> - const struct run_process_parallel_opts opts = {
>> + struct run_process_parallel_opts opts = {
>> .tr2_category = "hook",
>> .tr2_label = hook_name,
>>
>> .processes = 1,
>> - .ungroup = options->ungroup,
>>
>> .get_next_task = pick_next_hook,
>> .start_failure = notify_start_failure,
>
> What's omitted here is that the next two lines also dereference
> `options`. That'll also have to be fixed for the warning to go away.
Thanks for spotting this. Will fix in the same way.
prev parent reply other threads:[~2026-01-09 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 15:35 [PATCH][next] hook: check for NULL pointer before deref Adrian Ratiu
2026-01-09 15:51 ` Patrick Steinhardt
2026-01-09 15:57 ` Adrian Ratiu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ecnywzhd.fsf@collabora.com \
--to=adrian.ratiu@collabora.com \
--cc=cmlists@sent.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox