From 960a05d9c8debb309d1a1ff0aa719124f2c1a1e1 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 3 Mar 2000 01:08:54 +0000 Subject: [PATCH] * Stuff --- citadel/internet_addressing.c | 4 +++- citadel/serv_smtp.c | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index f68592928..e788da27e 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -318,6 +318,8 @@ int convert_internet_address(char *destuser, char *desthost, char *source) int msgtype = 0; safestrncpy(sourcealias, source, sizeof(sourcealias) ); + msgtype = alias(sourcealias); + lprintf(9, "msgtype(1) for <%s> is %d\n", msgtype, user); REALIAS: /* Split it up */ @@ -349,7 +351,7 @@ REALIAS: */ strcpy(sourcealias, user); msgtype = alias(user); - lprintf(9, "msgtype for <%s> is %d\n", msgtype, user); + lprintf(9, "msgtype(2) for <%s> is %d\n", msgtype, user); if ( (strcasecmp(user, sourcealias)) && (++passes < 3) ) goto REALIAS; diff --git a/citadel/serv_smtp.c b/citadel/serv_smtp.c index 55e8e0264..ce80fa44f 100644 --- a/citadel/serv_smtp.c +++ b/citadel/serv_smtp.c @@ -852,12 +852,12 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '2') { if (buf[0] == '4') { *status = 4; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } @@ -877,12 +877,12 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '2') { if (buf[0] == '4') { *status = 4; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } @@ -901,12 +901,12 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '2') { if (buf[0] == '4') { *status = 4; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } @@ -925,12 +925,12 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '2') { if (buf[0] == '4') { *status = 4; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } @@ -948,12 +948,12 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '3') { if (buf[0] == '4') { *status = 3; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } @@ -983,18 +983,18 @@ void smtp_try(char *key, char *addr, int *status, char *dsn, long msgnum) if (buf[0] != '2') { if (buf[0] == '4') { *status = 4; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } else { *status = 5; - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); goto bail; } } /* We did it! */ - strcpy(dsn, &buf[4]); + safestrncpy(dsn, &buf[4], 1023); *status = 2; lprintf(9, ">QUIT\n"); -- 2.39.2