Merge branch 'v2.5.x'
authorMichael Wallner <mike@php.net>
Wed, 9 Mar 2016 09:56:20 +0000 (10:56 +0100)
committerMichael Wallner <mike@php.net>
Wed, 9 Mar 2016 09:56:20 +0000 (10:56 +0100)
1  2 
src/php_http_client_curl.c
src/php_http_url.c

@@@ -1484,8 -1469,8 +1484,8 @@@ static void php_http_curle_options_init
                        ZVAL_BOOL(&opt->defval, 1);
                        opt->setter = php_http_curle_option_set_ssl_verifyhost;
                }
- #if PHP_HTTP_CURL_VERSION(7,41,0)
+ #if PHP_HTTP_CURL_VERSION(7,41,0) && (defined(PHP_HTTP_HAVE_OPENSSL) || defined(PHP_HTTP_HAVE_NSS) || defined(PHP_HTTP_HAVE_GNUTLS))
 -              php_http_option_register(registry, ZEND_STRL("verifystatus"), CURLOPT_SSL_VERIFYSTATUS, IS_BOOL);
 +              php_http_option_register(registry, ZEND_STRL("verifystatus"), CURLOPT_SSL_VERIFYSTATUS, _IS_BOOL);
  #endif
                php_http_option_register(registry, ZEND_STRL("cipher_list"), CURLOPT_SSL_CIPHER_LIST, IS_STRING);
                if ((opt = php_http_option_register(registry, ZEND_STRL("cainfo"), CURLOPT_CAINFO, IS_STRING))) {
@@@ -1495,9 -1496,9 +1496,9 @@@ softfail
        return state->ptr = tmp;
  }
  
 -php_http_url_t *php_http_url_parse(const char *str, size_t len, unsigned flags TSRMLS_DC)
 +php_http_url_t *php_http_url_parse(const char *str, size_t len, unsigned flags)
  {
-       size_t maxlen = 3 * len;
+       size_t maxlen = 3 * len + 8 /* null bytes for all components */;
        struct parse_state *state = ecalloc(1, sizeof(*state) + maxlen);
  
        state->end = str + len;