Re: [PATCH 1/2] blob.c: remove buffer & size arguments to parse_blob_buffer()
- From
Jeff King <peff@peff.net>
- Date
- Apr 13, 2021, 08:25 UTC
- Message-ID
- <YHVVlCg2EAb4ZddJ@coredump.intra.peff.net>
- In-Reply-To
- <87y2dqfgbb.fsf@evledraar.gmail.com>
On Sat, Apr 10, 2021 at 02:57:12PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> > 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