cvs: php4 /main rfc1867.c

From: Date: Mon, 01 Apr 2002 23:02:16 +0000
Subject: cvs: php4 /main rfc1867.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10819@lists.php.net to get a copy of this message
sniper Mon Apr 1 18:02:16 2002 EDT Modified files: /php4/main rfc1867.c Log: Prevent crashing with some bogus POSTs. Index: php4/main/rfc1867.c diff -u php4/main/rfc1867.c:1.96 php4/main/rfc1867.c:1.97 --- php4/main/rfc1867.c:1.96 Fri Mar 29 21:58:19 2002 +++ php4/main/rfc1867.c Mon Apr 1 18:02:16 2002 @@ -16,7 +16,7 @@ | Jani Taskinen <sniper@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.96 2002/03/30 02:58:19 sniper Exp $ */ +/* $Id: rfc1867.c,v 1.97 2002/04/01 23:02:16 sniper Exp $ */ /* * This product includes software developed by the Apache Group @@ -704,8 +704,15 @@ /* If file_uploads=off, skip the file part */ if (!PG(file_uploads)) { efree(filename); - efree(param); + if (param) efree(param); continue; + } + + /* Return with an error if the posted data is garbled */ + if (!param) { + sapi_module.sapi_error(E_WARNING, "File Upload Mime headers garbled"); + efree(filename); + SAFE_RETURN; } /* Handle file */

« previous php.cvs (#10819) next »