All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Matt Kraai <kraai@ftbfs.org>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] grep: do not segfault when -f is used
Date: Fri, 16 Oct 2009 12:34:23 +0200	[thread overview]
Message-ID: <4AD84C2F.5000809@viscovery.net> (raw)
In-Reply-To: <1255683204-28988-1-git-send-email-kraai@ftbfs.org>

Matt Kraai schrieb:
> "git grep" would segfault if its -f option was used because it would
> try to use an uninitialized strbuf, so initialize the strbuf.

Thanks for noticing and for the patch.

But...

> +test_expect_success 'grep should not segfault with -f' '
> +        test_must_fail git grep -f /dev/null
> +'

there must be a better way to test whether grep -f behaves correctly.

-- Hannes

  reply	other threads:[~2009-10-16 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16  8:53 [PATCH] grep: do not segfault when -f is used Matt Kraai
2009-10-16 10:34 ` Johannes Sixt [this message]
2009-10-16 13:39   ` Matt Kraai
2009-10-16 13:46     ` Johannes Sixt
2009-10-16 14:13       ` Matt Kraai
2009-10-17  7:44         ` 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=4AD84C2F.5000809@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kraai@ftbfs.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 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.