Fix for "the guninski bug", an integer overflow in case a single header from an incoming SMTP message is over 2GB long, by simply not counting any further than it really needs to. BUG: http://www.guninski.com/qmailcrash.html diff -ruN qmail-1.03-7.05/qmail-smtpd.c qmail-1.03-7.06/qmail-smtpd.c --- qmail-1.03-7.05/qmail-smtpd.c 2008-05-12 16:06:46.000000000 -0400 +++ qmail-1.03-7.06/qmail-smtpd.c 2008-01-23 09:25:44.000000000 -0500 @@ -1048,8 +1048,8 @@ if (flagmaybex) if (pos == 7) ++*hops; if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0; if (flagmaybey) if (pos == 1) flaginheader = 0; + ++pos; } - ++pos; if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; } } switch(state) {