git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	luke@diamand.org, "Christian Couder" <christian.couder@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH] unpack-trees.c: fix writing "link" index ext with null base oid
Date: Tue, 12 Feb 2019 08:49:11 -0800	[thread overview]
Message-ID: <xmqq1s4deyuw.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CABPp-BF+q0QY1YAKOk4iSrCRuEc7xsG7iqCzeDD9v8+jmvQvzg@mail.gmail.com> (Elijah Newren's message of "Mon, 11 Feb 2019 21:43:35 -0800")

Elijah Newren <newren@gmail.com> writes:

>> There is also another side fix in remove_split_index() that causes a
>> crash when doing "git update-index --no-split-index" when base_oid in
>> the index file is null. In this case we will not load
>> istate->split_index->base but we dereference it anyway and are rewarded
>> with a segfault. This should not happen anymore, but it's still wrong to
>> dereference a potential NULL pointer, especially when we do check for
>> NULL pointer in the next code.
>>
>> Reported-by: Luke Diamand <luke@diamand.org>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>
> Thanks for digging this down and fixing it.  When I saw this split
> index bug bisect to me that my heart sank a little; there's so much of
> that code I don't understand.  Nice to see you've already come along
> and fixed it all up.  :-)

Thanks, all.

  reply	other threads:[~2019-02-12 16:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 10:25 could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000' Luke Diamand
2019-02-06 13:17 ` Christian Couder
2019-02-08 10:02 ` Duy Nguyen
2019-02-08 16:38   ` Luke Diamand
2019-02-09  5:00     ` Duy Nguyen
2019-02-09  9:57       ` Luke Diamand
2019-02-09 10:36         ` Duy Nguyen
2019-02-09 11:23         ` [PATCH] unpack-trees.c: fix writing "link" index ext with null base oid Nguyễn Thái Ngọc Duy
2019-02-09 14:14           ` Luke Diamand
2019-02-12  5:43           ` Elijah Newren
2019-02-12 16:49             ` Junio C Hamano [this message]
2019-02-12  9:36           ` Ævar Arnfjörð Bjarmason
2019-02-13  9:51           ` [PATCH v2] read-cache.c: " Nguyễn Thái Ngọc Duy
2019-02-13 12:14             ` Ævar Arnfjörð Bjarmason
2019-02-08 17:23   ` could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000' Junio C Hamano
2019-02-09  4:56     ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1s4deyuw.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=luke@diamand.org \
    --cc=newren@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).