]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-setup.c: Initialize getline(3) response_size to 0
authorMike Kelly <pioto@pioto.org>
Thu, 14 Oct 2010 18:18:19 +0000 (14:18 -0400)
committerCarl Worth <cworth@cworth.org>
Fri, 29 Oct 2010 20:13:02 +0000 (13:13 -0700)
This appears to be necessary on FreeBSD. If this isn't done, we get a
nasty segfault.

See: id:20101013094340.41580a2f@pioto.org

notmuch-setup.c

index ec4bfebc7e52c5fda803b301c84cfc43f55360d7..c3ea9371c13cbc4058922fbdc920a5755e4084f0 100644 (file)
@@ -92,7 +92,7 @@ notmuch_setup_command (unused (void *ctx),
                       unused (int argc), unused (char *argv[]))
 {
     char *response = NULL;
                       unused (int argc), unused (char *argv[]))
 {
     char *response = NULL;
-    size_t response_size;
+    size_t response_size = 0;
     notmuch_config_t *config;
     const char **old_other_emails;
     size_t old_other_emails_len;
     notmuch_config_t *config;
     const char **old_other_emails;
     size_t old_other_emails_len;