cvs: php-src(PHP_5_0) /main/streams plain_wrapper.c
| From: | Uwe Schindler | Date: | Thu, 07 Apr 2005 07:28:54 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /main/streams plain_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31274@lists.php.net to get a copy of this message | ||
thetaphi Thu Apr 7 03:28:54 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main/streams plain_wrapper.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/plain_wrapper.c?r1=1.39.2.4&r2=1.39.2.5&ty=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.39.2.4 php-src/main/streams/plain_wrapper.c:1.39.2.5
--- php-src/main/streams/plain_wrapper.c:1.39.2.4 Wed Apr 6 09:59:48 2005
+++ php-src/main/streams/plain_wrapper.c Thu Apr 7 03:28:53 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.39.2.4 2005/04/06 13:59:48 iliaa Exp $ */
+/* $Id: plain_wrapper.c,v 1.39.2.5 2005/04/07 07:28:53 thetaphi Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -461,6 +461,9 @@
/* we were opened as a plain file descriptor, so we
* need fdopen now */
data->file = fdopen(data->fd, stream->mode);
+ if (data->file == NULL) {
+ return FAILURE;
+ }
}
*(FILE**)ret = data->file;