diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-03-03 09:59:32 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-03-03 09:59:32 +0300 |
commit | 26827a011186ebb0c0cbabe588e7717caf4d4327 (patch) | |
tree | 34ad74b921db61ea8d7db2015b059ca4dfd955fe /ext/soap/php_encoding.c | |
parent | 4e2c87edb34c4f151da6899d523c93b8e8565975 (diff) | |
parent | 035d80523f3ec1c5f1c071a7b2e71cbe3ef43461 (diff) | |
download | php-git-26827a011186ebb0c0cbabe588e7717caf4d4327.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Added type checks
Fixed bug #67741 (auto_prepend_file messes up __LINE__)
Check variable type before its usage as IS_ARRAY.
Fixed a bug that header value is not terminated by '\0' when accessed through getenv().
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 032e17beec..20502e5a55 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -3638,18 +3638,21 @@ static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type TS Z_OBJCE_PP(tmp) == soap_var_class_entry) { zval **ztype; - if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_type", sizeof("enc_type"), (void **)&ztype) == FAILURE) { + if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_type", sizeof("enc_type"), (void **)&ztype) == FAILURE || + Z_TYPE_PP(ztype) != IS_LONG) { soap_error0(E_ERROR, "Encoding: SoapVar has no 'enc_type' property"); } cur_type = Z_LVAL_PP(ztype); - if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_stype", sizeof("enc_stype"), (void **)&ztype) == SUCCESS) { + if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_stype", sizeof("enc_stype"), (void **)&ztype) == SUCCESS && + Z_TYPE_PP(ztype) == IS_STRING) { cur_stype = Z_STRVAL_PP(ztype); } else { cur_stype = NULL; } - if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_ns", sizeof("enc_ns"), (void **)&ztype) == SUCCESS) { + if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_ns", sizeof("enc_ns"), (void **)&ztype) == SUCCESS && + Z_TYPE_PP(ztype) == IS_STRING) { cur_ns = Z_STRVAL_PP(ztype); } else { cur_ns = NULL; |