From 13b2cc419187af0ef20c031b45d267df94590d03 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Wed, 13 Apr 1994 15:53:31 -0800 Subject: [PATCH] try to handle very large SIZE parameters (should be a quad) SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.37 --- usr/src/usr.sbin/sendmail/src/srvrsmtp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/srvrsmtp.c b/usr/src/usr.sbin/sendmail/src/srvrsmtp.c index b7114bcdf5..5633f3d513 100644 --- a/usr/src/usr.sbin/sendmail/src/srvrsmtp.c +++ b/usr/src/usr.sbin/sendmail/src/srvrsmtp.c @@ -10,9 +10,9 @@ #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 -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 */ @@ -386,7 +386,11 @@ smtp(e) 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) { -- 2.20.1