From: Jeff King Date: Tue, 13 Apr 2021 08:25:56 GMT Subject: Re: [PATCH 1/2] blob.c: remove buffer & size arguments to parse_blob_buffer() Message-ID: In-Reply-To: <87y2dqfgbb.fsf@evledraar.gmail.com> On Sat, Apr 10, 2021 at 02:57:12PM +0200, Ævar Arnfjörð Bjarmason wrote: > > Not new in your patch, but I wondered if this could cause a segfault > > when lookup_blob() returns NULL. I _think_ the answer is "no". We'd hit > > this code path when either: > [...] > I was trying to keep the changes smaller, but what about just doing this?: > [...] Yeah, that seems pretty reasonable to me. It cleans up the extra lookups in parse_object() and gets rid of the funny-named "parse_blob_buffer()" that takes no buffer. -Peff