diff options
author | Joe Watkins <krakjoe@php.net> | 2017-01-22 06:41:20 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-01-22 06:41:20 +0000 |
commit | d6ef39e04aa724e13fa8b6bc3de7cf2e7e7bc2bc (patch) | |
tree | e57590865503402b2cce15b376706620fbbab24e | |
parent | 5d6e7027322ec5e72e60e6dd5a899900eb280e64 (diff) | |
parent | 55393e26a57c997c5f6e7a5dc68da00065a12614 (diff) | |
download | php-git-d6ef39e04aa724e13fa8b6bc3de7cf2e7e7bc2bc.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
Fix intermittent segfault in GD library
-rw-r--r-- | ext/gd/gd_ctx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 80156e9004..7502cb0f4c 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -160,7 +160,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, RETURN_FALSE; } } else { - ctx = emalloc(sizeof(gdIOCtx)); + ctx = ecalloc(1, sizeof(gdIOCtx)); ctx->putC = _php_image_output_putc; ctx->putBuf = _php_image_output_putbuf; ctx->gd_free = _php_image_output_ctxfree; @@ -173,7 +173,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } if (!ctx) { - ctx = emalloc(sizeof(gdIOCtx)); + ctx = ecalloc(1, sizeof(gdIOCtx)); ctx->putC = _php_image_stream_putc; ctx->putBuf = _php_image_stream_putbuf; if (close_stream) { |