Re: [PATCH v2 00/12] coverity: avoid dereferencing NULL
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 10, 2026, 15:46 UTC
- Message-ID
- <xmqqa4ryg84e.fsf@gitster.g>
- In-Reply-To
- <pull.2174.v2.git.1783683577.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 23 quoted lines
> This is a continuation of the effort I started in the patch series that > became js/coverity-fixes. This next batch adds guards to avoid dereferencing > NULL pointers and accessing NULL file descriptors. > > Changes since v1: > > * Calling remote_tracking() no longer returns -1 when remote is NULL, but > instead BUG()s out. > * bisect_successful() returns with BISECT_FAILED instead of the -1 that > only worked by happenstance. > * The commit "revision: avoid dereferencing NULL in add_parents_only()" now > comes with a regression test. > * The commit "bisect: ensure non-NULL head before using it" no longer > claims that the fixed bug can be triggered with the current code base. > * The missing shallow commit's OID is no longer computed twice. > * A follow-up commit was folded into this patch series that lets > write_one_shallow() avoid the rolling buffers of oid_to_hex(), as > suggested by Junio. It technically does not fit the goal of this patch > series (fixing issues pointed out by Coverity), but was asked for > explicitly. > ... > Range-diff vs v1: > ...
I found everything including the new patch good. Unless others find more issues in this round in a few days, let's mark the topic for 'next'.
Thanks.