com php-src: Merge branch 'PHP-5.6': ext/gd/gd_ctx.c
| From: | Christoph Michael Becker | Date: | Sat, 11 Jul 2015 19:01:01 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/gd/gd_ctx.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87924@lists.php.net to get a copy of this message | ||
Commit: 77cd79012e464d7b560e361ab0305dc88133d9e1
Author: Christoph M. Becker <cmb@php.net> Sat, 11 Jul 2015 21:01:01 +0200
Parents: 1a94e518592b5b84c8c14c769c973e517e1c6954 bac1fe743818a5a062d5fea7086b3f90f499749f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=77cd79012e464d7b560e361ab0305dc88133d9e1
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
updated NEWS
Fix #66339: PHP segfaults in imagexbm
Bugs:
https://bugs.php.net/66339
Changed paths:
MM ext/gd/gd_ctx.c
Diff:
diff --cc ext/gd/gd_ctx..c
index c848e43,46331d8..5f7c5ae
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@@ -131,9 -134,14 +131,14 @@@ static void _php_image_output_ctx(INTER
RETURN_FALSE;
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 2nd parameter, it must a filename or
a stream");
+ php_error_docref(NULL, E_WARNING, "Invalid 2nd parameter, it must a filename or a
stream");
RETURN_FALSE;
}
+ } else if (argc > 1 && file != NULL) {
+ stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN,
NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
} else {
ctx = emalloc(sizeof(gdIOCtx));
ctx->putC = _php_image_output_putc;