From: Junio C Hamano Date: Mon, 20 Oct 2025 16:31:26 GMT Subject: Re: [Outreachy PATCH v3 1/2] gpg-interface: replace strbuf_split*() with string_list_split*() Message-ID: In-Reply-To: Junio C Hamano writes: > What I was missing was that we use fingerprint[1], not > fingerprint[0]. So we need to do the strchr() twice, i.e. > > char *begin = fingerprint_stdout.buf; > char *delim = strchr(begin, ' '); > if (!delim) > die_errno("Barf!"); > begin = delim + 1 > delim = strchr(begin, ' '); > if (!delim) > die_errno("Barf!"); > fingerprint_ret = xmemdupz(begin, end - begin); Ouch, of course "end" is not declared anywhere and it is an obvious typo of delim. Sorry for not proofreading enough.