#include "support.h"
#include "config.h"
#include "user_ops.h"
-#include "policy.h"
#include "database.h"
#include "msgbase.h"
#include "internet_addressing.h"
* of messages in the inbox, or -1 for error)
*/
int pop3_grab_mailbox(void) {
- struct visit vbuf;
+ visit vbuf;
int i;
if (CtdlGetRoom(&CC->room, MAILROOM) != 0) return(-1);
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 {
cprintf("+OK Message %d:\r\n", which_one);
ptr = ChrPtr(msgtext);
- while (ptr = memreadline(ptr, buf, (sizeof buf - 2)),
+ while (ptr = cmemreadline(ptr, buf, (sizeof buf - 2)),
( (*ptr != 0) && (done == 0))) {
strcat(buf, "\r\n");
if (in_body == 1) {
*/
void pop3_update(void) {
int i;
- struct visit vbuf;
+ visit vbuf;
long *deletemsgs = NULL;
int num_deletemsgs = 0;