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  <[EMAIL PROTECTED]>                       |
   +----------------------------------------------------------------------+
 
-  $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! */

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

Reply via email to