Skip to content

Commit 10b15f0

Browse files
committed
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: Conflicts: main/streams/memory.c
2 parents ee864f3 + 5446377 commit 10b15f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ PHP NEWS
66
?? ??? 2015, PHP 5.5.22
77

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

main/streams/memory.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
374374

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

0 commit comments

Comments
 (0)