From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Jeff King <peff@peff.net>
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, 04 Aug 2014 23:06:03 +0200 [thread overview]
Message-ID: <vpqtx5s7yo4.fsf@anie.imag.fr> (raw)
In-Reply-To: <20140804203351.GA12898@peff.net> (Jeff King's message of "Mon, 4 Aug 2014 16:33:51 -0400")
Jeff King <peff@peff.net> writes:
> 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).
Indeed.
strbuf_split_buf() does not seem to distinguish between x= and x. No
time to debug this further, sorry.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2014-08-04 21:06 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
2014-08-04 21:06 ` Matthieu Moy [this message]
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=vpqtx5s7yo4.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--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.