diff options
| author | manuel <manuel@mausz.at> | 2014-01-27 15:22:03 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2014-01-27 15:22:03 +0100 |
| commit | b2596d21e976743f42a82b7a7a173c7874386bb4 (patch) | |
| tree | e2645475af24c8b4ae792d386dda31f84ec58b70 /qmail-smtpd.c | |
| parent | dbc3230e0cd04918d3dd993774f525c1b63f6c07 (diff) | |
| download | qmail-b2596d21e976743f42a82b7a7a173c7874386bb4.tar.gz qmail-b2596d21e976743f42a82b7a7a173c7874386bb4.tar.bz2 qmail-b2596d21e976743f42a82b7a7a173c7874386bb4.zip | |
[PATCH] protect qmail-smtpd from large received-lines
This patch corrects a small programming error in
the blast() routine of qmail-smtpd.c. This is
sometimes referred to as the "Guninski" bug,
in reference to its discoverer.
see
* http://www.guninski.com/qmailcrash.html
* http://thedjbway.b0llix.net/qmail/patches/qmail-1.03.smtpd-blast.patch
Diffstat (limited to 'qmail-smtpd.c')
| -rw-r--r-- | qmail-smtpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c index ecb7b85..4e40adf 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c | |||
| @@ -760,8 +760,8 @@ int *hops; | |||
| 760 | if (flagmaybex) if (pos == 7) ++*hops; | 760 | if (flagmaybex) if (pos == 7) ++*hops; |
| 761 | if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0; | 761 | if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0; |
| 762 | if (flagmaybey) if (pos == 1) flaginheader = 0; | 762 | if (flagmaybey) if (pos == 1) flaginheader = 0; |
| 763 | ++pos; | ||
| 763 | } | 764 | } |
| 764 | ++pos; | ||
| 765 | if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; } | 765 | if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; } |
| 766 | } | 766 | } |
| 767 | switch(state) { | 767 | switch(state) { |
