sas             Sat Sep 20 08:44:52 2003 EDT

  Modified files:              (Branch: PHP_4)
    /php-src/sapi/thttpd        thttpd_patch 
  Log:
  Fix potential buffer overrun
  
  
Index: php-src/sapi/thttpd/thttpd_patch
diff -u php-src/sapi/thttpd/thttpd_patch:1.31.2.12 
php-src/sapi/thttpd/thttpd_patch:1.31.2.12.2.1
--- php-src/sapi/thttpd/thttpd_patch:1.31.2.12  Mon Jun 16 15:11:44 2003
+++ php-src/sapi/thttpd/thttpd_patch    Sat Sep 20 08:44:51 2003
@@ -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/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 @@
  ** 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 @@
  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/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/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 @@
      (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 @@
        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 @@
  ** 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 @@
  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 @@
 +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 @@
        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 @@
  ** 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/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_

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to