try to handle very large SIZE parameters (should be a quad)
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 13 Apr 1994 23:53:31 +0000 (15:53 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 13 Apr 1994 23:53:31 +0000 (15:53 -0800)
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.37

usr/src/usr.sbin/sendmail/src/srvrsmtp.c

index b7114bc..5633f3d 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.36 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.37 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.36 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.37 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -386,7 +386,11 @@ smtp(e)
                                                usrerr("501 SIZE requires a value");
                                                /* NOTREACHED */
                                        }
                                                usrerr("501 SIZE requires a value");
                                                /* NOTREACHED */
                                        }
-                                       msize = atol(vp);
+# ifdef __STDC__
+                                       msize = strtoul(vp, (char **) NULL, 10);
+# else
+                                       msize = strtol(vp, (char **) NULL, 10);
+# endif
                                }
                                else if (strcasecmp(kp, "body") == 0)
                                {
                                }
                                else if (strcasecmp(kp, "body") == 0)
                                {