cvs: php-src /ext/mime_magic mime_magic.c

From: Date: Mon, 20 Oct 2003 14:36:52 +0000
Subject: cvs: php-src /ext/mime_magic mime_magic.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24190@lists.php.net to get a copy of this message
iliaa Mon Oct 20 10:36:52 2003 EDT Modified files: /php-src/ext/mime_magic mime_magic.c Log: Fixed bug #25918 (Possible crash in mime_content_type()). Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.32 php-src/ext/mime_magic/mime_magic.c:1.33 --- php-src/ext/mime_magic/mime_magic.c:1.32 Fri Sep 26 03:47:01 2003 +++ php-src/ext/mime_magic/mime_magic.c Mon Oct 20 10:36:51 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <hholzgra@php.net> | +----------------------------------------------------------------------+ - $Id: mime_magic.c,v 1.32 2003/09/26 07:47:01 hholzgra Exp $ + $Id: mime_magic.c,v 1.33 2003/10/20 14:36:51 iliaa Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -1954,9 +1954,8 @@ } /* detect memory allocation errors */ - if (!content_type || - (state == rsl_encoding && !*content_encoding)) { - return MIME_MAGIC_ERROR; + if (!content_type || !(*content_type) || (state == rsl_encoding && !*content_encoding)) { + return MIME_MAGIC_ERROR; } /* success! */

« previous php.cvs (#24190) next »