]>
Commit | Line | Data |
---|---|---|
03c751e7 | 1 | --- sendmail-8.13.3/sendmail/collect.c~ 2004-12-01 00:29:15.000000000 +0100 |
2 | +++ sendmail-8.13.3/sendmail/collect.c 2005-03-08 09:43:40.848804648 +0100 | |
ca019133 JB |
3 | @@ -15,6 +15,8 @@ |
4 | ||
5 | SM_RCSID("@(#)$Id$") | |
3b0d3a8f | 6 | |
7 | +#define MAXHDRZ 512 | |
ca019133 | 8 | + |
ca019133 | 9 | static void eatfrom __P((char *volatile, ENVELOPE *)); |
03c751e7 | 10 | static void collect_doheader __P((ENVELOPE *)); |
dd7c6823 ER |
11 | static SM_FILE_T *collect_dfopen __P((ENVELOPE *)); |
12 | @@ -283,6 +285,7 @@ | |
3b0d3a8f | 13 | register ENVELOPE *e; |
03c751e7 | 14 | bool rsetsize; |
3b0d3a8f | 15 | { |
16 | + int hdrz = 0; | |
dd7c6823 ER |
17 | register SM_FILE_T *df; |
18 | bool ignrdot; | |
19 | int dbto; | |
03c751e7 | 20 | @@ -613,6 +616,16 @@ |
3b0d3a8f | 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 |