All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Tanay Abhra <tanayabh@gmail.com>,
	git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH] pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
Date: Mon, 4 Aug 2014 16:33:51 -0400	[thread overview]
Message-ID: <20140804203351.GA12898@peff.net> (raw)
In-Reply-To: <vpqmwbki7h3.fsf@anie.imag.fr>

On Mon, Aug 04, 2014 at 05:45:44PM +0200, Matthieu Moy wrote:

> Tanay Abhra <tanayabh@gmail.com> writes:
> 
> > `git_pretty_formats_config()` continues without checking git_config_string's
> > return value which can lead to a SEGFAULT.
> 
> Indeed, without the patch:
> 
> $ git -c pretty.my= log --pretty=my                        
> error: Missing value for 'pretty.my'                         
> zsh: segmentation fault  git -c pretty.my= log --pretty=my

Hmm. Not related to the original patch, but that really looks like a
bug. Shouldn't "git -c pretty.my= ..." set pretty.my to the empty string?

I'd expect "git -c pretty.my ..." to set it to NULL (i.e., the "implicit
true" you get from omitting the "=" in the config files themselves).

-Peff

  parent reply	other threads:[~2014-08-04 20:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 14:41 [PATCH] pretty.c: make git_pretty_formats_config return -1 on git_config_string failure Tanay Abhra
2014-08-04 15:45 ` Matthieu Moy
2014-08-04 18:56   ` Eric Sunshine
2014-08-04 19:49     ` Matthieu Moy
2014-08-04 20:33   ` Jeff King [this message]
2014-08-04 21:06     ` Matthieu Moy
2014-08-04 21:56       ` [PATCH] config: teach "git -c" to recognize an empty string Jeff King
2014-08-04 22:25         ` 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=20140804203351.GA12898@peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tanayabh@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.