cvs: php-src /main/streams plain_wrapper.c
| From: | Uwe Schindler | Date: | Thu, 07 Apr 2005 07:29:14 +0000 |
| Subject: | cvs: php-src /main/streams plain_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31275@lists.php.net to get a copy of this message | ||
thetaphi Thu Apr 7 03:29:14 2005 EDT
Modified files:
/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.43&r2=1.44&ty=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.43 php-src/main/streams/plain_wrapper.c:1.44
--- php-src/main/streams/plain_wrapper.c:1.43 Wed Apr 6 09:57:30 2005
+++ php-src/main/streams/plain_wrapper.c Thu Apr 7 03:29:14 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.43 2005/04/06 13:57:30 iliaa Exp $ */
+/* $Id: plain_wrapper.c,v 1.44 2005/04/07 07:29:14 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;