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

Carl Worth cworth at cworth.org
Fri Oct 29 13:15:42 PDT 2010


On Thu, 14 Oct 2010 14:18:19 -0400, Mike Kelly <pioto at 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 at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20101029/32ce5436/attachment.pgp>


More information about the notmuch mailing list