Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Tribo Dar <3bodar@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] Segmentation fault in git v2.41.0.rc1
Date: Wed, 24 May 2023 06:59:55 +0000	[thread overview]
Message-ID: <CACJVABb8tvgXAowgtHLrC6Uau8Q03VRFu1m7K91SJwjvufqXYw@mail.gmail.com> (raw)

Running `git submodule update` after commenting out the url setting in both
.gitmodules and the corresponding section for the submodule in .git/config
results in a segmentation fault instead of a suitable error message.

The cause is `sub->url` being NULL here (actual segfault
comes a couple calls further):
https://github.com/git/git/blob/9e49351c3060e1fa6e0d2de64505b7becf157f28/builtin/submodule--helper.c#L2027

Possibly relevant: a similar snippet is being properly protected against
null-pointer dereferencing here:
https://github.com/git/git/blob/9e49351c3060e1fa6e0d2de64505b7becf157f28/builtin/submodule--helper.c#L1243

             reply	other threads:[~2023-05-24  7:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  6:59 Tribo Dar [this message]
2023-05-24 14:47 ` [BUG] Segmentation fault in git v2.41.0.rc1 Taylor Blau
2023-05-24 16:02   ` [PATCH] builtin/submodule--helper.c: handle missing submodule URLs Taylor Blau
2023-05-24 16:25     ` [PATCH v2] " Taylor Blau
2023-05-24 18:48       ` Eric Sunshine
2023-05-24 19:50         ` Taylor Blau
2023-05-24 19:51     ` [PATCH v3] " Taylor Blau
2023-05-24 20:29       ` René Scharfe
2023-05-24 20:36         ` Taylor Blau
2023-05-24 20:33       ` Jeff King
2023-05-24 22:58     ` [PATCH] " Jeff King
2023-05-24 20:25   ` [BUG] Segmentation fault in git v2.41.0.rc1 Junio C Hamano

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

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

  git send-email \
    --in-reply-to=CACJVABb8tvgXAowgtHLrC6Uau8Q03VRFu1m7K91SJwjvufqXYw@mail.gmail.com \
    --to=3bodar@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
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).