File: 0005-don-t-NULL-deref-if-TARPIT-is-defined-and-someone-doe.diff

package info (click to toggle)
fnord 1.10-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 356 kB
  • ctags: 169
  • sloc: ansic: 1,894; makefile: 101; sh: 71; perl: 36
file content (26 lines) | stat: -rw-r--r-- 660 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 83d7d17bf3189ffc9dc291a66759567b4ce4624f Mon Sep 17 00:00:00 2001
From: leitner <leitner>
Date: Sun, 4 Nov 2007 21:07:27 +0000
Subject: [PATCH] don't NULL-deref if TARPIT is defined and someone does not send a
 User-Agent header (Thanks, Peter Conrad)

---
 httpd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/httpd.c b/httpd.c
index 43296e6..a4ca6bb 100644
--- a/httpd.c
+++ b/httpd.c
@@ -1400,7 +1400,7 @@ handlenext:
   }
 
 #ifdef TARPIT
-  if (str_equal(ua,"EmailSiphon")) { sleep(120); exit(0); }
+  if (ua && str_equal(ua,"EmailSiphon")) { sleep(120); exit(0); }
 #endif
 
   port=getenv("TCPLOCALPORT");
-- 
1.5.3.8