iliaa           Mon Oct 20 10:37:03 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/mime_magic     mime_magic.c 
  Log:
  MFH: Fixed bug #25918 (Possible crash in mime_content_type()).
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.440 php-src/NEWS:1.1247.2.441
--- php-src/NEWS:1.1247.2.440   Mon Oct 20 10:22:10 2003
+++ php-src/NEWS        Mon Oct 20 10:37:01 2003
@@ -6,6 +6,7 @@
 - Fixed multibyte regex engine to properly handle ".*" pattern under
   POSIX compatible mode. (K.Kosako <kosako at sofnec.co.jp>, Moriyoshi)
 - Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia)
+- Fixed bug #25918 (Possible crash in mime_content_type()). (Ilia)
 - Fixed bug #25895 (Incorrect detection of safe_mode limited ini options).
   (Ilia)
 - Fixed bug #25836 (last key of multi-dimensional array passed via GPC not
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.13.2.9 
php-src/ext/mime_magic/mime_magic.c:1.13.2.10
--- php-src/ext/mime_magic/mime_magic.c:1.13.2.9        Sun Feb  9 14:10:32 2003
+++ php-src/ext/mime_magic/mime_magic.c Mon Oct 20 10:37:02 2003
@@ -15,7 +15,7 @@
   | Author: Hartmut Holzgraefe  <[EMAIL PROTECTED]>                       |
   +----------------------------------------------------------------------+
 
-  $Id: mime_magic.c,v 1.13.2.9 2003/02/09 19:10:32 sniper Exp $ 
+  $Id: mime_magic.c,v 1.13.2.10 2003/10/20 14:37:02 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:
@@ -1848,9 +1848,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! */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to