Date: 02/12/00
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2717 Updated: Odd output from cgi...is this a memory leak?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3157 Updated: The print command does not work anymore"
- In reply to: thies <email protected>: "Re: [PHP-DEV] Bug #2944: fix feedback"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thies <email protected> wrote:
> could you please send us the a patch for PHP 3 as well?
>
Here it is. (Basically the same patch applied to the file functions/mime.c)
Alain
--- php3cvs/functions/mime.c Sat Feb 12 20:38:00 2000
+++ php3/functions/mime.c Sat Feb 12 20:40:38 2000
@@ -48,6 +48,7 @@
{
char *ptr, *loc, *loc2, *s, *name, *filename, *u, *fn;
int len, state = 0, Done = 0, rem, urem;
+ int eolsize;
long bytes, max_file_size = 0;
char *namebuf=NULL, *filenamebuf=NULL, *lbuf=NULL, *abuf=NULL;
char sbytes[16];
@@ -66,8 +67,13 @@
if (!strncmp(loc, boundary, len)) {
state = 1;
- rem -= (loc - ptr) + len + 2;
- ptr = loc + len + 2;
+
+ eolsize = 2;
+ if(*(loc+len)==0x0a)
+ eolsize = 1;
+
+ rem -= (loc - ptr) + len + eolsize;
+ ptr = loc + len + eolsize;
} else {
rem -= (loc - ptr) + 1;
ptr = loc + 1;
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2717 Updated: Odd output from cgi...is this a memory leak?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3157 Updated: The print command does not work anymore"
- In reply to: thies <email protected>: "Re: [PHP-DEV] Bug #2944: fix feedback"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

