diff --git a/src/mail_menu.c b/src/mail_menu.c index ac726a7..2f273f8 100644 --- a/src/mail_menu.c +++ b/src/mail_menu.c @@ -1454,6 +1454,8 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno uuid_t magi_msgid; struct ptr_vector msg_lines; + init_ptr_vector(&msg_lines); + jb = open_jam_base(conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->path); if (!jb) { dolog("Error opening JAM base.. %s", conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->path); diff --git a/src/stralloc/stralloc.c b/src/stralloc/stralloc.c index 180b2fe..10473ed 100644 --- a/src/stralloc/stralloc.c +++ b/src/stralloc/stralloc.c @@ -16,7 +16,7 @@ int stralloc_ready(stralloc *sa, size_t n) { sa->s = malloc(n); return sa != NULL; } - if (sa->a <= n) + if (sa->a >= n) return 1; na = 30 + n + (n >> 3); ns = realloc(sa->s, na);