diff options
author | Joe Watkins <krakjoe@php.net> | 2017-01-22 06:41:07 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-01-22 06:41:07 +0000 |
commit | 55393e26a57c997c5f6e7a5dc68da00065a12614 (patch) | |
tree | 5ecda2c81cf121263a42e40f32043b01f75f9530 /ext/gd | |
parent | 722375c603e8c74934daf752047424e4f2fd022f (diff) | |
parent | e56fe7e5e7a926bfdf142a7a844544c0127e92b7 (diff) | |
download | php-git-55393e26a57c997c5f6e7a5dc68da00065a12614.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fix intermittent segfault in GD library
Diffstat (limited to 'ext/gd')
-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 dd62c63664..388d66106e 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -152,7 +152,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; @@ -165,7 +165,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) { |