Re: [PATCH] notmuch-setup.c: Initialize getline(3) response_size to 0

Subject: Re: [PATCH] notmuch-setup.c: Initialize getline(3) response_size to 0

Date: Fri, 29 Oct 2010 13:15:42 -0700

To: Mike Kelly, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Thu, 14 Oct 2010 14:18:19 -0400, Mike Kelly <pioto@pioto.org> wrote:
> This appears to be necessary on FreeBSD. If this isn't done, we get a
> nasty segfault.

Thanks. I've pushed this out.

I didn't have that initialized originally, because the documentation I
have for getline on my Linux machine says explicitly:

       If *lineptr is NULL, then getline() will allocate a buffer for
       storing the line, which should be freed by the user program.  (In
       this case, the value in *n is ignored.)

But, oh well, it's easy enough to fix.

Thanks again for the patch.

-Carl

-- 
carl.d.worth@intel.com
part-000.sig (application/pgp-signature)

Thread: