Bug #13612 Updated: Upload for files sometimes segfaults + patch

From: Date: Tue, 09 Oct 2001 14:16:44 +0000
Subject: Bug #13612 Updated: Upload for files sometimes segfaults + patch
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67607@lists.php.net to get a copy of this message
ID: 13612 Updated by: sniper Reported By: mw@sime.com Old Status: Open Status: Closed Old Bug Type: Reproducible crash Bug Type: HTTP related Operating System: Linux tropica1 2.2.19ext3 PHP Version: 4.0.6 New Comment: This should be fixed in CVS. (and in PHP 4.0.7RC3) So please try the latest CVS snapshot from http://snaps.php.net/ and reopen this bug report if it doesn't work. --Jani Previous Comments: ------------------------------------------------------------------------ [2001-10-09 10:06:35] mw@sime.com PHP crashes in rfc1867.c:173, because the variable "rem" is made smaller 2 bytes for every file upload input than it should. a hacky fix is to add the following line to the file rfc1867.c, around line 435: state = 0; rem -= (loc - ptr); ptr = loc; + rem = cnt - (buf - ptr); break; but this is not enough imho. in line 173 it should be checked if "loc" is NULL. I've a complete dump of the form-data and the apache environment, so contact me if you need further information. Tested with PHP-4.0.6, Apache 1.3.12, Linux 2.2.19, IE 6.0 and NS 6.1 ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13612&edit=1

« previous php.dev (#67607) next »