Skip to content

pr-2199/newren/promisor-remote-require-argument-v1

tagged this 12 Aug 06:39
From: Elijah Newren <newren@gmail.com>

d460267613da (Add 'promisor-remote' capability to protocol v2,
2025-02-18) added a receive callback which passes the capability value
directly to mark_promisor_remotes_as_accepted(). However, a client can
send the capability name without an '=' or value, in which case
get_capability() supplies NULL and strbuf_split_str() dereferences it.

Reject the missing argument before parsing it, and add a test covering
this case.

Signed-off-by: Elijah Newren <newren@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2199.git.1786516783909.gitgitgadget@gmail.com
Assets 2
Loading