Commit 89fb41d0 89fb41d0170724c49d23c0887d5f47026b221898 by Sergey Poznyakoff

Bugfixes

* libproto/imap/tag.c: Initialize allocated slot to 0
* mu/imap.c: Fix number of elements to allocate
1 parent 723ade1a
......@@ -40,6 +40,8 @@ _mu_imap_tag_incr (mu_imap_t imap)
if (!np)
return ENOMEM;
imap->tag_buf = np;
imap->tag_buf[imap->tag_len] = 0;
sp = realloc (imap->tag_str,
(imap->tag_len + 2) * sizeof imap->tag_str[0]);
if (!sp)
......
......@@ -588,7 +588,7 @@ com_connect (int argc, char **argv)
if (!status)
{
connect_argc = argc;
connect_argv = mu_calloc (argc, sizeof (*connect_argv));
connect_argv = mu_calloc (argc + 1, sizeof (*connect_argv));
for (i = 0; i < argc; i++)
connect_argv[i] = mu_strdup (argv[i]);
connect_argv[i] = NULL;
......