thetaphi                Thu Apr  7 03:28:08 2005 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/main       streams.c 
  Log:
  Bug #32614 - prevent from crahsing with segfault on solaris if fdopen() fails 
- this fixes NOT the stdio-problem on solaris!
  
http://cvs.php.net/diff.php/php-src/main/streams.c?r1=1.125.2.94&r2=1.125.2.95&ty=u
Index: php-src/main/streams.c
diff -u php-src/main/streams.c:1.125.2.94 php-src/main/streams.c:1.125.2.95
--- php-src/main/streams.c:1.125.2.94   Mon Apr  4 16:26:49 2005
+++ php-src/main/streams.c      Thu Apr  7 03:28:08 2005
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.125.2.94 2005/04/04 20:26:49 pollita Exp $ */
+/* $Id: streams.c,v 1.125.2.95 2005/04/07 07:28:08 thetaphi Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1595,6 +1595,9 @@
                        if (ret) {
                                if (data->file == NULL) {
                                        data->file = fdopen(data->fd, 
stream->mode);
+                                       if (data->file == NULL) {
+                                               return FAILURE;
+                                       }
                                }
                                *(FILE**)ret = data->file;
                                data->fd = -1;

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

Reply via email to