From 0ebbe5e450c380dc6400afac4307fa65f2710f7a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 3 Jan 2011 15:35:01 +0000 Subject: [PATCH] - fix crash when argc > 1 and to_zval is NULL (thx tony for the headup) --- ext/gd/gd_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index eb7c299203..7be95d0290 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -118,7 +118,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } } - if (argc > 1) { + if (argc > 1 && to_zval) { if (Z_TYPE_P(to_zval) == IS_RESOURCE) { php_stream_from_zval_no_verify(stream, &to_zval); if (stream == NULL) { -- 2.50.1