* split cutuserkey() out of makeuserkey(); its name doesn't show that theres a modifi...
[citadel.git] / citadel / modules / pop3 / serv_pop3.c
index 107e0366d8a7384cd1da1289e359e56f667227a5..33fa1203d36d72f4d21f5173e1388d799e04405e 100644 (file)
@@ -284,11 +284,11 @@ void pop3_apop(char *argbuf)
 void pop3_pass(char *argbuf) {
        char password[SIZ];
 
-       strcpy(password, argbuf);
+       safestrncpy(password, argbuf, sizeof password);
        striplt(password);
 
        /* CtdlLogPrintf(CTDL_DEBUG, "Trying <%s>\n", password); */
-       if (CtdlTryPassword(password) == pass_ok) {
+       if (CtdlTryPassword(password, strlen(password)) == pass_ok) {
                pop3_login();
        }
        else {