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

index e79ef1519ce5c39ba5a7fefc433db7d1be96b07b,f49aabc7342d43b34a95bcd8351cd41b9dd34248..e56f8d416b6a6e1701922f504945d1e09a2bcd41
@@@ -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))) {
index 4009add52fc369a78c1741b9c2d12a2466bc1516,07121df42c0d9c7992e72c92a70639ec0520e7fc..3ed2e3cbf2fd6beeee72a41ca50345b957efbdf6
@@@ -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;