OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp.c versions 1.32 and 1.33
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.32 -> 1.33

--- lmtp2nntp.c  2001/08/28 13:12:58     1.32
+++ lmtp2nntp.c  2001/08/28 14:27:35     1.33
@@ -176,7 +176,7 @@
     ctx->asGroupargs = 0;
     initsession(&ctx->session);
     ctx->msg = NULL;
-    if (uname(&ctx->uname) != 0) {
+    if (uname(&ctx->uname) == -1) {
         fprintf(stderr, "%s:Error: uname failed \"%s\"\n", progname, strerror(errno));
         exit(ERR_EXECUTION);
     }
@@ -755,7 +755,7 @@
      *  RFC1893 2. Status Codes                         5.X.X   Permanent Failure
      *  RFC1893 3.5 Network and Routing Status          X.5.0   Other or undefined protocol status
      */
-    if (ctx->msg->mail_from == NULL) {
+    if ((ctx->msg == NULL) || (ctx->msg->mail_from == NULL)) {
         res.statuscode = "503";
         res.dsncode    = "5.5.0";
         res.statusmsg  = "specify sender with MAIL first.";
@@ -858,7 +858,7 @@
      *  RFC1893 2. Status Codes                         5.X.X   Permanent Failure
      *  RFC1893 3.5 Network and Routing Status          X.5.0   Other or undefined protocol status
      */
-    if (argz_count(ctx->msg->azRcpt, ctx->msg->asRcpt) == 0) {
+    if ((ctx->msg == NULL) || (argz_count(ctx->msg->azRcpt, ctx->msg->asRcpt) == 0)) {
         res.statuscode = "503";
         res.dsncode    = "5.5.0";
         res.statusmsg  = "specify recipient with RCPT first.";

CVSTrac 2.0.1