From: Junio C Hamano Date: Thu, 17 Sep 2026 19:32:09 GMT Subject: Re: [PATCH 2/7] gpg-interface: make signature-prefix matching length-aware Message-ID: In-Reply-To: <3fc7774ba867a10f35f7a74424baa4527f038232.1789667556.git.gitgitgadget@gmail.com> "Johannes Schindelin via GitGitGadget" writes: > @@ -669,7 +669,7 @@ int check_signature(struct signature_check *sigc, > sigc->result = 'N'; > sigc->trust_level = TRUST_UNDEFINED; > > - fmt = get_format_by_sig(signature); > + fmt = get_format_by_sig(signature, slen); > if (!fmt) > die(_("bad/incompatible signature '%s'"), signature); All the existing callers of check_signature() pass a NUL-terminated buffer which is pair of a strbuf. Another approach that may be simpler is to drop the slen parameter from check_signature().