]> Pileus Git - ~andy/fetchmail/commitdiff
Kill alloca().
authorMatthias Andree <matthias.andree@gmx.de>
Sun, 31 Jul 2005 00:42:13 +0000 (00:42 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 31 Jul 2005 00:42:13 +0000 (00:42 -0000)
svn path=/trunk/; revision=4199

pop3.c

diff --git a/pop3.c b/pop3.c
index b5d1a9655d0c95547e7590bb06a8c551c61cd3da..1c0eaaf97becd03bf33c3eae8ed874cb9c3772ce 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -561,11 +561,11 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
            *++end = '\0';
 
        /* copy timestamp and password into digestion buffer */
-       xalloca(msg, char *, (end-start+1) + strlen(ctl->password) + 1);
+       msg = xmalloc((end-start+1) + strlen(ctl->password) + 1);
        strcpy(msg,start);
        strcat(msg,ctl->password);
-
        strcpy(ctl->digest, MD5Digest((unsigned char *)msg));
+       free(msg);
 
        ok = gen_transact(sock, "APOP %s %s", ctl->remotename, ctl->digest);
        break;