]> git.pld-linux.org Git - packages/sendmail.git/blame - sendmail-hprescan-dos.patch
- ooops - left from tests...
[packages/sendmail.git] / sendmail-hprescan-dos.patch
CommitLineData
ca019133
JB
1diff -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$")
3b0d3a8f 7
8+#define MAXHDRZ 512
ca019133
JB
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 @@
3b0d3a8f 14 HDR **hdrp;
15 register ENVELOPE *e;
16 {
17+ int hdrz = 0;
ca019133
JB
18 register SM_FILE_T *volatile df;
19 volatile bool ignrdot;
20 volatile time_t dbto;
21@@ -582,6 +585,16 @@
3b0d3a8f 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.039073 seconds and 4 git commands to generate.