diff options
author | Uwe Schindler <thetaphi@php.net> | 2005-04-07 07:29:14 +0000 |
---|---|---|
committer | Uwe Schindler <thetaphi@php.net> | 2005-04-07 07:29:14 +0000 |
commit | cd47b3c54286e312f5f14437fe65411e100d4328 (patch) | |
tree | 5037319c1a68f738f3bd3f3db3983ce35c4194fa /main/streams/plain_wrapper.c | |
parent | e2e53b65111d04a71ef2d56ebd960c8c055f2bd7 (diff) | |
download | php-git-cd47b3c54286e312f5f14437fe65411e100d4328.tar.gz |
Bug #32614 - prevent from crahsing with segfault on solaris if fdopen() fails - this fixes NOT the stdio-problem on solaris!
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index ad362cf45f..9e776db23e 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -461,6 +461,9 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) /* 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; |