com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/openssl/x p_ssl.c

From: Date: Tue, 13 Sep 2016 17:19:20 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/openssl/x p_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94493@lists.php.net to get a copy of this message
Commit: 3a739c9f9f049335c1a1194cd3a50b0cab211d0b Author: Jakub Zelenka <bukka@php.net> Tue, 13 Sep 2016 18:17:04 +0100 Parents: c8a9ad1527160536e81dec702ebb0c52d85635a8 05baa927277c820de4deee0991c24c7f4c545105 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3a739c9f9f049335c1a1194cd3a50b0cab211d0b Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM ext/openssl/xp_ssl.c Diff: diff --cc ext/openssl/xp_ssl.c index 53536a1,d549033..208aafc --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@@ -1356,12 -1355,15 +1356,13 @@@ static int enable_server_sni(php_strea sslsock->sni_certs = (php_openssl_sni_cert_t*)safe_pemalloc(sslsock->sni_cert_count, sizeof(php_openssl_sni_cert_t), 0, php_stream_is_persistent(stream) ); + memset(sslsock->sni_certs, 0, sslsock->sni_cert_count * sizeof(php_openssl_sni_cert_t)); - for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(val), &pos); - zend_hash_get_current_data_ex(Z_ARRVAL_PP(val), (void **)&current, &pos) == SUCCESS; - zend_hash_move_forward_ex(Z_ARRVAL_PP(val), &pos) - ) { - key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(val), &key, &key_len, &key_index, 0, &pos); - if (key_type != HASH_KEY_IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(val), key_index, key, current) { + (void) key_index; + + if (!key) { + php_error_docref(NULL, E_WARNING, "SNI_server_certs array requires string host name keys" ); return FAILURE;

« previous php.cvs (#94493) next »