]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail-hprescan-dos.patch
- up to 8.15.2
[packages/sendmail.git] / sendmail-hprescan-dos.patch
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
3 @@ -15,6 +15,8 @@
4  
5  SM_RCSID("@(#)$Id$")
6  
7 +#define MAXHDRZ 512
8 +
9  static void    eatfrom __P((char *volatile, ENVELOPE *));
10  static void    collect_doheader __P((ENVELOPE *));
11  static SM_FILE_T *collect_dfopen __P((ENVELOPE *));
12 @@ -283,6 +285,7 @@
13         register ENVELOPE *e;
14         bool rsetsize;
15  {
16 +       int hdrz = 0;
17         register SM_FILE_T *df;
18         bool ignrdot;
19         int dbto;
20 @@ -613,6 +616,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.03895 seconds and 3 git commands to generate.