]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail-hprescan-dos.patch
- added man to BR
[packages/sendmail.git] / sendmail-hprescan-dos.patch
1 diff -Nur sendmail-8.12.0.orig/sendmail/collect.c sendmail-8.12.0/sendmail/collect.c
2 --- sendmail-8.12.0.orig/sendmail/collect.c     Wed Sep  5 00:43:02 2001
3 +++ sendmail-8.12.0/sendmail/collect.c  Mon Sep 24 10:25:42 2001
4 @@ -15,6 +15,8 @@
5  
6  SM_RCSID("@(#)$Id$")
7  
8 +#define MAXHDRZ 512
9 +
10  static void    collecttimeout __P((time_t));
11  static void    dferror __P((SM_FILE_T *volatile, char *, ENVELOPE *));
12  static void    eatfrom __P((char *volatile, ENVELOPE *));
13 @@ -292,6 +294,7 @@
14         HDR **hdrp;
15         register ENVELOPE *e;
16  {
17 +       int hdrz = 0;
18         register SM_FILE_T *volatile df;
19         volatile bool ignrdot;
20         volatile time_t dbto;
21 @@ -582,6 +585,16 @@
22                                 mstate = MS_BODY;
23                                 goto nextstate;
24                         }
25
26 +            if (hdrz++>MAXHDRZ)
27 +                        {
28 +                                sm_syslog(LOG_NOTICE, e->e_id,
29 +                                "excessive headers from %s during message collect",
30 +                                CurHostName ? CurHostName : "<local machine>");
31 +                                errno = 0;
32 +                                usrerr("451 Stop this. You are lame.");
33 +                                goto readerr;
34 +                        }
35  
36                         /* check for possible continuation line */
37                         do
This page took 0.070354 seconds and 3 git commands to generate.