]> git.pld-linux.org Git - packages/sendmail.git/blame - sendmail-hprescan-dos.patch
- merged manpath patch with part of redhat patch (both changing
[packages/sendmail.git] / sendmail-hprescan-dos.patch
CommitLineData
3b0d3a8f 1diff -r -u -N sendmail-8.10.2/sendmail/collect.c sendmail-8.10.2.conectiva/sendmail/collect.c
2--- sendmail-8.10.2/sendmail/collect.c Wed Mar 15 16:47:27 2000
3+++ sendmail-8.10.2.conectiva/sendmail/collect.c Tue Jul 18 15:14:15 2000
4@@ -11,6 +11,7 @@
5 *
6 */
7
8+#define MAXHDRZ 512
9 #ifndef lint
10 static char id[] = "@(#)$Id$";
11 #endif /* ! lint */
12@@ -104,6 +105,7 @@
13 HDR **hdrp;
14 register ENVELOPE *e;
15 {
16+ int hdrz = 0;
17 register FILE *volatile df;
18 volatile bool ignrdot = smtpmode ? FALSE : IgnrDot;
19 volatile time_t dbto = smtpmode ? TimeOuts.to_datablock : 0;
20@@ -417,6 +419,16 @@
21 mstate = MS_BODY;
22 goto nextstate;
23 }
24+
25+ if (hdrz++>MAXHDRZ)
26+ {
27+ sm_syslog(LOG_NOTICE, e->e_id,
28+ "excessive headers from %s during message collect",
29+ CurHostName ? CurHostName : "<local machine>");
30+ errno = 0;
31+ usrerr("451 Stop this. You are lame.");
32+ goto readerr;
33+ }
34
35 /* check for possible continuation line */
36 do
This page took 0.09563 seconds and 4 git commands to generate.