* Stuff
authorArt Cancro <ajc@citadel.org>
Fri, 3 Mar 2000 01:08:54 +0000 (01:08 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 3 Mar 2000 01:08:54 +0000 (01:08 +0000)
citadel/internet_addressing.c
citadel/serv_smtp.c

index f6859292806884784f45f79976c777e6c0fa072d..e788da27e0087639a88431532d357c3d0b69eacd 100644 (file)
@@ -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;
 
index 55e8e026434ea06cfaab2adb79687564ec694c59..ce80fa44fe41ac6ea6b9bf9b75b9036b0a5680df 100644 (file)
@@ -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");