Tidying: Coverity
[users/jgh/exim.git] / src / src / transports / smtp.c
index 95bee582d104c2db141496ba4b1e5c346585d1c9..81da5b0a868c04eedac9926be4199df95d4d2b03 100644 (file)
@@ -1858,6 +1858,7 @@ if (  smtp_peer_options & PEER_OFFERED_TLS
        )
       {
       Ustrncpy(sx->buffer, buffer2, sizeof(sx->buffer));
+      sx->buffer[sizeof(sx->buffer)-1] = '\0';
       goto RESPONSE_FAILED;
       }
     }
@@ -3189,7 +3190,7 @@ if (sx.completed_addr && sx.ok && sx.send_quit)
       if (! (sx.ok = smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0))
         {
         msg = US string_sprintf("send() to %s [%s] failed: %s", host->name,
-          host->address, strerror(save_errno));
+          host->address, strerror(errno));
         sx.send_quit = FALSE;
         }
       else if (! (sx.ok = smtp_read_response(&sx.inblock, sx.buffer,