View | Details | Raw Unified | Return to bug 155027
Collapse All | Expand All

(-)hiawatha/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	hiawatha
8
PORTNAME=	hiawatha
9
PORTVERSION=	7.4
9
PORTVERSION=	7.4
10
PORTREVISION=	1
10
CATEGORIES=	www
11
CATEGORIES=	www
11
MASTER_SITES=	http://www.hiawatha-webserver.org/files/ \
12
MASTER_SITES=	http://www.hiawatha-webserver.org/files/ \
12
		http://www.c-s.li/ports/
13
		http://www.c-s.li/ports/
(-)hiawatha/files/patch-hiawatha.c (+19 lines)
Line 0 Link Here
1
--- hiawatha.c.orig	2011-02-25 14:21:15.953502381 +0100
2
+++ hiawatha.c	2011-02-25 14:24:44.166094143 +0100
3
@@ -34,6 +34,7 @@
4
 #include <sys/wait.h>
5
 #include <sys/socket.h>
6
 #include <sys/time.h>
7
+#include <limits.h>
8
 #include "alternative.h"
9
 #include "mimetype.h"
10
 #include "serverconfig.h"
11
@@ -418,7 +419,7 @@
12
 							*strend = '\0';
13
 							content_length = str2int(strstart);
14
 							*strend = '\r';
15
-							if (content_length < 0) {
16
+							if ((content_length < 0) || (INT_MAX - content_length - 2 <= header_length)) {
17
 								result = 400;
18
 								break;
19
 							}

Return to bug 155027