Prerequisites:
028_sendmail.patch must have already been applied
Apply by doing:
cd /usr/src
patch -p0 < 031_sendmail.patch
And then rebuild, install and restart sendmail:
cd gnu/usr.sbin/sendmail
make obj
make depend
make
make install
kill -HUP `sed 1q /var/run/sendmail.pid`
if (*s == '\0')
@@ -73,16 +73,28 @@
{
/* find first flag to set */
i = 0;
- while (isascii(*s) && isdigit(*s))
+ while (isascii(*s) && isdigit(*s) && i < tTsize)
i = i * 10 + (*s++ - '0');
+
+ /*
+ ** skip over rest of a too large number
+ ** Maybe we should complain if out-of-bounds values are used.
+ */
+
+ while (isascii(*s) && isdigit(*s) && i >= tTsize)
+ s++;
first = i;
/* find last flag to set */
if (*s == '-')
{
i = 0;
- while (isascii(*++s) && isdigit(*s))
+ while (isascii(*++s) && isdigit(*s) && i < tTsize)
i = i * 10 + (*s - '0');
+
+ /* skip over rest of a too large number */
+ while (isascii(*s) && isdigit(*s) && i >= tTsize)
+ s++;
}
last = i;