Thread (12 messages) flat view 12 messages, 3 authors, 2d ago

Re: [PATCH 2/7] gpg-interface: make signature-prefix matching length-aware

From: Junio C Hamano <hidden>
Date: 2026-09-17 19:32:11

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
quoted hunk ↗ jump to hunk
@@ -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 <buf, len> pair of a strbuf.  Another approach that
may be simpler is to drop the slen parameter from check_signature().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help