summaryrefslogtreecommitdiff
path: root/sapi/thttpd
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-09-20 12:45:05 +0000
committerSascha Schumann <sas@php.net>2003-09-20 12:45:05 +0000
commit5e3de075fbd74fede3c644f7ea0b033be61b80a5 (patch)
tree50f842cd7f73af81ec443d8f65066f4d8a8c66e9 /sapi/thttpd
parent8c52344418272d5ada3d640afa3f09b3b471a5f5 (diff)
downloadphp-git-5e3de075fbd74fede3c644f7ea0b033be61b80a5.tar.gz
Fix potential buffer overrun
Diffstat (limited to 'sapi/thttpd')
-rw-r--r--sapi/thttpd/thttpd_patch35
1 files changed, 22 insertions, 13 deletions
diff --git a/sapi/thttpd/thttpd_patch b/sapi/thttpd/thttpd_patch
index ebe8f3f052..5f1e10037f 100644
--- a/sapi/thttpd/thttpd_patch
+++ b/sapi/thttpd/thttpd_patch
@@ -1,6 +1,6 @@
diff -ur thttpd-2.21b/Makefile.in thttpd-2.21b-cool/Makefile.in
--- thttpd-2.21b/Makefile.in Thu Mar 29 20:36:21 2001
-+++ thttpd-2.21b-cool/Makefile.in Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/Makefile.in Sat Sep 20 14:43:20 2003
@@ -46,13 +46,15 @@
# You shouldn't need to edit anything below here.
@@ -40,7 +40,7 @@ diff -ur thttpd-2.21b/Makefile.in thttpd-2.21b-cool/Makefile.in
diff -ur thttpd-2.21b/config.h thttpd-2.21b-cool/config.h
--- thttpd-2.21b/config.h Mon Apr 9 23:57:36 2001
-+++ thttpd-2.21b-cool/config.h Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/config.h Sat Sep 20 14:43:20 2003
@@ -82,6 +82,11 @@
*/
#define IDLE_READ_TIMELIMIT 60
@@ -64,7 +64,7 @@ diff -ur thttpd-2.21b/config.h thttpd-2.21b-cool/config.h
** index pages for directories that don't have an explicit index file.
diff -ur thttpd-2.21b/configure thttpd-2.21b-cool/configure
--- thttpd-2.21b/configure Sat Apr 21 02:07:14 2001
-+++ thttpd-2.21b-cool/configure Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/configure Sat Sep 20 14:43:20 2003
@@ -1021,7 +1021,7 @@
fi
echo "$ac_t""$CPP" 1>&6
@@ -76,7 +76,7 @@ diff -ur thttpd-2.21b/configure thttpd-2.21b-cool/configure
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
diff -ur thttpd-2.21b/configure.in thttpd-2.21b-cool/configure.in
--- thttpd-2.21b/configure.in Sat Apr 21 02:06:23 2001
-+++ thttpd-2.21b-cool/configure.in Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/configure.in Sat Sep 20 14:43:20 2003
@@ -64,7 +64,7 @@
AC_MSG_RESULT(no)
fi
@@ -88,7 +88,7 @@ diff -ur thttpd-2.21b/configure.in thttpd-2.21b-cool/configure.in
diff -ur thttpd-2.21b/fdwatch.c thttpd-2.21b-cool/fdwatch.c
--- thttpd-2.21b/fdwatch.c Fri Apr 13 07:36:08 2001
-+++ thttpd-2.21b-cool/fdwatch.c Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/fdwatch.c Sat Sep 20 14:43:20 2003
@@ -419,6 +419,7 @@
if ( pollfds == (struct pollfd*) 0 || poll_fdidx == (int*) 0 ||
poll_rfdidx == (int*) 0 )
@@ -119,7 +119,7 @@ diff -ur thttpd-2.21b/fdwatch.c thttpd-2.21b-cool/fdwatch.c
}
diff -ur thttpd-2.21b/libhttpd.c thttpd-2.21b-cool/libhttpd.c
--- thttpd-2.21b/libhttpd.c Tue Apr 24 00:42:40 2001
-+++ thttpd-2.21b-cool/libhttpd.c Mon Jun 16 21:09:31 2003
++++ thttpd-2.21b-cool/libhttpd.c Sat Sep 20 14:43:29 2003
@@ -56,6 +56,10 @@
#include <unistd.h>
#include <stdarg.h>
@@ -383,6 +383,15 @@ diff -ur thttpd-2.21b/libhttpd.c thttpd-2.21b-cool/libhttpd.c
(void) my_snprintf( buf, sizeof(buf),
"<HTML><HEAD><TITLE>%d %s</TITLE></HEAD>\n<BODY BGCOLOR=\"#cc9999\"><H2>%d %s</H2>\n",
status, title, status, title );
+@@ -764,7 +844,7 @@
+ char* cp2;
+
+ for ( cp1 = str, cp2 = dfstr;
+- *cp1 != '\0' && cp2 - dfstr < dfsize - 1;
++ *cp1 != '\0' && cp2 - dfstr < dfsize - 5;
+ ++cp1, ++cp2 )
+ {
+ switch ( *cp1 )
@@ -834,7 +914,7 @@
fp = fopen( filename, "r" );
if ( fp == (FILE*) 0 )
@@ -964,7 +973,7 @@ diff -ur thttpd-2.21b/libhttpd.c thttpd-2.21b-cool/libhttpd.c
str[0] = '?';
diff -ur thttpd-2.21b/libhttpd.h thttpd-2.21b-cool/libhttpd.h
--- thttpd-2.21b/libhttpd.h Tue Apr 24 00:36:50 2001
-+++ thttpd-2.21b-cool/libhttpd.h Mon Jun 16 21:09:00 2003
++++ thttpd-2.21b-cool/libhttpd.h Sat Sep 20 14:43:20 2003
@@ -69,6 +69,8 @@
char* server_hostname;
int port;
@@ -1026,7 +1035,7 @@ diff -ur thttpd-2.21b/libhttpd.h thttpd-2.21b-cool/libhttpd.h
** mallocced strings.
diff -ur thttpd-2.21b/mime_encodings.txt thttpd-2.21b-cool/mime_encodings.txt
--- thttpd-2.21b/mime_encodings.txt Wed May 10 03:22:28 2000
-+++ thttpd-2.21b-cool/mime_encodings.txt Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/mime_encodings.txt Sat Sep 20 14:43:20 2003
@@ -3,6 +3,6 @@
# A list of file extensions followed by the corresponding MIME encoding.
# Extensions not found in the table proceed to the mime_types table.
@@ -1038,7 +1047,7 @@ diff -ur thttpd-2.21b/mime_encodings.txt thttpd-2.21b-cool/mime_encodings.txt
uu x-uuencode
diff -ur thttpd-2.21b/mime_types.txt thttpd-2.21b-cool/mime_types.txt
--- thttpd-2.21b/mime_types.txt Sat Apr 14 04:53:30 2001
-+++ thttpd-2.21b-cool/mime_types.txt Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/mime_types.txt Sat Sep 20 14:43:20 2003
@@ -1,135 +1,138 @@
-# mime_types.txt
-#
@@ -1289,7 +1298,7 @@ diff -ur thttpd-2.21b/mime_types.txt thttpd-2.21b-cool/mime_types.txt
+ice x-conference/x-cooltalk
diff -ur thttpd-2.21b/mmc.c thttpd-2.21b-cool/mmc.c
--- thttpd-2.21b/mmc.c Fri Apr 13 23:02:15 2001
-+++ thttpd-2.21b-cool/mmc.c Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/mmc.c Sat Sep 20 14:43:20 2003
@@ -70,6 +70,9 @@
unsigned int hash;
int hash_idx;
@@ -1392,7 +1401,7 @@ diff -ur thttpd-2.21b/mmc.c thttpd-2.21b-cool/mmc.c
else
diff -ur thttpd-2.21b/mmc.h thttpd-2.21b-cool/mmc.h
--- thttpd-2.21b/mmc.h Fri Apr 13 07:36:54 2001
-+++ thttpd-2.21b-cool/mmc.h Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/mmc.h Sat Sep 20 14:43:20 2003
@@ -31,8 +31,9 @@
/* Returns an mmap()ed area for the given file, or (void*) 0 on errors.
** If you have a stat buffer on the file, pass it in, otherwise pass 0.
@@ -1406,7 +1415,7 @@ diff -ur thttpd-2.21b/mmc.h thttpd-2.21b-cool/mmc.h
** If you have a stat buffer on the file, pass it in, otherwise pass 0.
diff -ur thttpd-2.21b/thttpd.c thttpd-2.21b-cool/thttpd.c
--- thttpd-2.21b/thttpd.c Tue Apr 24 00:41:57 2001
-+++ thttpd-2.21b-cool/thttpd.c Mon Jun 16 21:09:56 2003
++++ thttpd-2.21b-cool/thttpd.c Sat Sep 20 14:43:20 2003
@@ -53,6 +53,10 @@
#endif
#include <unistd.h>
@@ -2356,7 +2365,7 @@ diff -ur thttpd-2.21b/thttpd.c thttpd-2.21b-cool/thttpd.c
+
diff -ur thttpd-2.21b/version.h thttpd-2.21b-cool/version.h
--- thttpd-2.21b/version.h Tue Apr 24 04:05:23 2001
-+++ thttpd-2.21b-cool/version.h Mon Jun 16 21:08:05 2003
++++ thttpd-2.21b-cool/version.h Sat Sep 20 14:43:20 2003
@@ -3,7 +3,7 @@
#ifndef _VERSION_H_
#define _VERSION_H_