Re: Bug #2944: fix feedback

From: Date: Sat, 12 Feb 2000 19:59:52 +0000
Subject: Re: Bug #2944: fix feedback
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-15471@lists.php.net to get a copy of this message
thies@digicol.de 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;

« previous php.dev (#15471) next »