void imap_logger(int direction, const char * str, size_t size)
{
gchar buf[512];
+
+ memset(buf, 0, 512);
strncpy(buf, str, size > 510 ? 510:size);
buf[511] = '\0';
if (size < 511)
imap_get_msg_att_info(msg_att, &uid, &headers, &size,
&att_dyn);
+ if (!headers)
+ return NULL;
info = malloc(sizeof(* info));
info->uid = uid;
info->headers = strdup(headers);
clistiter * cur;
unsigned int i;
carray * env_list;
-
i = 0;
env_list = carray_new(16);
msg_att = clist_content(cur);
env_info = fetch_to_env_info(msg_att);
+ if (!env_info)
+ return MAILIMAP_ERROR_MEMORY;
carray_add(env_list, env_info, NULL);
}
int res;
clist * fetch_result;
int r;
- carray * env_list;
+ carray * env_list = NULL;
chashdatum key;
chashdatum value;