diff options
author | Nayana Hettiarachchi <nayana@ddproperty.com> | 2015-02-05 12:26:29 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-02-05 16:32:30 +0800 |
commit | 5446377c6ba644da1b9092ba1957e948927851b3 (patch) | |
tree | 4179c02f69ebf38123ffa139a298da4b11a5b491 /main/streams | |
parent | 959cecf046c16ac4d1a2afe2d37e3e89a36cb902 (diff) | |
download | php-git-5446377c6ba644da1b9092ba1957e948927851b3.tar.gz |
Conflicts:
main/streams/memory.c
Diffstat (limited to 'main/streams')
-rw-r--r-- | main/streams/memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index 0d00505664..d0f2511aa7 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -374,6 +374,10 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t if (memsize + count >= ts->smax) { php_stream *file = php_stream_fopen_tmpfile(); + if (file == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory."); + return 0; + } php_stream_write(file, membuf, memsize); php_stream_free_enclosed(ts->innerstream, PHP_STREAM_FREE_CLOSE); ts->innerstream = file; |