iliaa           Tue Aug 26 21:10:25 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/main       streams.c 
  Log:
  MFH: Prevent a crash when expand_filepath() fails.
  
  
Index: php-src/main/streams.c
diff -u php-src/main/streams.c:1.125.2.73 php-src/main/streams.c:1.125.2.74
--- php-src/main/streams.c:1.125.2.73   Tue Jul 29 14:26:59 2003
+++ php-src/main/streams.c      Tue Aug 26 21:10:25 2003
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.125.2.73 2003/07/29 18:26:59 iliaa Exp $ */
+/* $Id: streams.c,v 1.125.2.74 2003/08/27 01:10:25 iliaa Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1943,7 +1943,9 @@
                return NULL;
        }
 
-       realpath = expand_filepath(filename, NULL TSRMLS_CC);
+       if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) {
+               return NULL;
+       }
 
        if (persistent) {
                spprintf(&persistent_id, 0, "streams_stdio_%d_%s", open_flags, 
realpath);

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

Reply via email to