Skip to content

Commit ae90010

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
Conflicts: main/streams/memory.c
2 parents a79f332 + 5446377 commit ae90010

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
?? Feb 2015, PHP 5.6.6
88

99
- Core:
10+
. Fixed bug #68986 (pointer returned by php_stream_fopen_temporary_file
11+
not validated in memory.c). (nayana at ddproperty dot com)
1012
. Fixed bug #67068 (getClosure returns somethings that's not a closure).
1113
(Danack at basereality dot com)
1214
. Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname

main/streams/memory.c

+4
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
375375

376376
if (memsize + count >= ts->smax) {
377377
php_stream *file = php_stream_fopen_temporary_file(ts->tmpdir, "php", NULL);
378+
if (file == NULL) {
379+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory.");
380+
return 0;
381+
}
378382
php_stream_write(file, membuf, memsize);
379383
php_stream_free_enclosed(ts->innerstream, PHP_STREAM_FREE_CLOSE);
380384
ts->innerstream = file;

0 commit comments

Comments
 (0)