diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-04-08 00:01:48 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-04-08 00:01:48 +0000 |
commit | f728678bb849258add7555b4f5d53f5fb43e31fd (patch) | |
tree | da1331939f0300059bcfccda0d95fa7a16140bf2 /ext/imap/php_imap.c | |
parent | df86a8d39802fa52f01d09da8f26cb2741696c14 (diff) | |
download | php-git-f728678bb849258add7555b4f5d53f5fb43e31fd.tar.gz |
Fixed bug #44663 (Crash in imap_mail_compose if "body" parameter invalid)
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index bd7a272c65..cab5f7e5b6 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3047,8 +3047,8 @@ PHP_FUNCTION(imap_mail_compose) } zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body)); - if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter cannot be empty"); + if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS || Z_TYPE_PP(data) != IS_ARRAY) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter must be a non-empty array"); RETURN_FALSE; } |