From: Junio C Hamano Date: Sun, 22 Oct 2017 00:46:13 GMT Subject: Re: [PATCH 4/4] worktree: handle broken symrefs in find_shared_symref() Message-ID: In-Reply-To: <20171021192601.2nvkmzsctujzxjbm@sigill.intra.peff.net> Jeff King writes: > On Sat, Oct 21, 2017 at 06:49:15AM -0400, Eric Sunshine wrote: > >> On Thu, Oct 19, 2017 at 1:49 PM, Jeff King wrote: >> > The refs_resolve_ref_unsafe() function may return NULL even >> > with a REF_ISSYMREF flag if a symref points to a broken ref. >> > As a result, it's possible for find_shared_symref() to >> > segfault when it passes NULL to strcmp(). >> > [...] >> > We can fix this by treating NULL the same as a non-matching >> > symref. Arguably we'd prefer to tell know if a symref points >> >> s/tell// > > Right, thank you. > > -Peff Thanks. Already tweaked in.