]> Pileus Git - ~andy/fetchmail/blobdiff - pop2.c
Major overhaul:
[~andy/fetchmail] / pop2.c
diff --git a/pop2.c b/pop2.c
index 88ad42441830e71aa062617569d1538e1ce4514d..126a62a1c1160eb1b0d62d766e0e9098a920d9fd 100644 (file)
--- a/pop2.c
+++ b/pop2.c
@@ -59,7 +59,7 @@ static int pop2_getauth(int sock, struct query *ctl, char *buf)
 {
     int status;
 
-    strcpy(shroud, ctl->password);
+    strlcpy(shroud, ctl->password, sizeof(shroud));
     status = gen_transact(sock,
                  "HELO %s %s",
                  ctl->remotename, ctl->password);
@@ -117,7 +117,7 @@ static int pop2_fetch(int sock, struct query *ctl, int number, int *lenp)
     return(ok);
 }
 
-static int pop2_trail(int sock, struct query *ctl, int number)
+static int pop2_trail(int sock, struct query *ctl, int number, const char *tag)
 /* send acknowledgement for message data */
 {
     return(gen_transact(sock, ctl->keep ? "ACKS" : "ACKD"));
@@ -132,13 +132,8 @@ static int pop2_logout(int sock, struct query *ctl)
 static const struct method pop2 =
 {
     "POP2",                            /* Post Office Protocol v2 */
-#if INET6_ENABLE
-    "pop2",                            /* standard POP2 port */
-    "pop2",                            /* ssl POP2 port */
-#else /* INET6_ENABLE */
     109,                               /* standard POP2 port */
     109,                               /* ssl POP2 port - not */
-#endif /* INET6_ENABLE */
     FALSE,                             /* this is not a tagged protocol */
     FALSE,                             /* does not use message delimiter */
     pop2_ok,                           /* parse command response */