X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fpopi.c;h=ef11a4a4937654177c0c9414a8fabce5138c80a3;hp=1dc74a3b6dc1484350c299b2751fd6ddbc079118;hb=1bb1f6c3f38b05060bf699ea2743f7386889bf63;hpb=dee387b53ab0d42922f857b60d6f980c9e79d16f diff --git a/uip/popi.c b/uip/popi.c index 1dc74a3..ef11a4a 100644 --- a/uip/popi.c +++ b/uip/popi.c @@ -3,12 +3,17 @@ * popi.c -- POP initiator for MPOP * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include #include #include #include +#include #include #ifndef RPOP @@ -76,7 +81,6 @@ static char mailname[BUFSIZ]; static char *nfs = NULL; static struct msgs *mp; -extern int errno; extern char response[]; /* @@ -211,7 +215,7 @@ main (int argc, char **argv) } snprintf (mailname, sizeof(mailname), "PO box for %s@%s", user, host); - if (pop_init (host, user, pass, snoop, rpop) == NOTOK) + if (pop_init (host, user, pass, NULL, snoop, rpop) == NOTOK) adios (NULL, "%s", response); if (rpop > 0) setuid (getuid ()); @@ -399,8 +403,7 @@ popi (void) if (*dp == '\\' || *dp == '"' || *dp == '\n') i++; i++; - if ((ep = malloc ((unsigned) i)) == NULL) - adios (NULL, "out of memory"); + ep = mh_xmalloc ((unsigned) i); for (dp = nfs, fp = ep; *dp; dp++) { if (*dp == '\n') { *fp++ = '\\', *fp++ = 'n';