Bug #13612: Upload for files sometimes segfaults + patch

From: Date: Tue, 09 Oct 2001 14:06:36 +0000
Subject: Bug #13612: Upload for files sometimes segfaults + patch
Groups: php.dev 
Request: Send a blank email to php-dev+get-67604@lists.php.net to get a copy of this message
From: mw@sime.com Operating system: Linux tropica1 2.2.19ext3 PHP version: 4.0.6 PHP Bug Type: Reproducible crash Bug description: Upload for files sometimes segfaults + patch 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 bug report at: http://bugs.php.net/?id=13612&edit=1

« previous php.dev (#67604) next »