X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=pop%2Fpop.c;h=9b5340932a8f2008e0d14bc5d7e1d98f9d8af18b;hb=27c3007f2cfb52db5a357eaa2a8313a5ab03c93d;hp=be2d105faf7c2c117c763b7b049db7656e959108;hpb=7b392ef7b50798f9eb3e7c869e634c5fef0092d1;p=apps%2Fmadmutt.git diff --git a/pop/pop.c b/pop/pop.c index be2d105..9b53409 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -103,7 +103,7 @@ static pop_query_status pop_read_header (POP_DATA * pop_data, HEADER * h) } } - fclose (f); + m_fclose(&f); unlink (tempfile); return ret; } @@ -362,7 +362,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) if (ret == PQ_OK) break; - safe_fclose (&msg->fp); + m_fclose(&msg->fp); unlink (path); if (ret == PQ_ERR) { @@ -490,7 +490,7 @@ static int pop_check_mailbox (CONTEXT * ctx, void pop_fetch_mail (void) { char buffer[LONG_STRING]; - char msgbuf[SHORT_STRING]; + char msgbuf[STRING]; char *url, *p; int i, delanswer, last = 0, msgs, bytes, rset = 0; pop_query_status ret; @@ -499,6 +499,7 @@ void pop_fetch_mail (void) MESSAGE *msg = NULL; ACCOUNT act; POP_DATA *pop_data; + ssize_t plen; if (!PopHost) { mutt_error _("POP host is not defined."); @@ -506,12 +507,13 @@ void pop_fetch_mail (void) return; } - url = p = p_new(char, strlen (PopHost) + 7); + plen = m_strlen(PopHost) + 7; + url = p = p_new(char, plen); if (url_check_scheme (PopHost) == U_UNKNOWN) { - strcpy (url, "pop://"); /* __STRCPY_CHECKED__ */ - p = strchr (url, '\0'); + plen -= m_strcpy(url, plen, "pop://"); + p += plen; } - strcpy (p, PopHost); /* __STRCPY_CHECKED__ */ + m_strcpy(p, plen, PopHost); ret = pop_parse_path (url, &act); p_delete(&url);