diff options
author | Xinchen Hui <laruence@php.net> | 2015-03-25 13:05:08 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-03-25 13:05:08 +0800 |
commit | fe0ca2745f00940a27bfc8e87db534541a19af70 (patch) | |
tree | 9f6ecb6d7dd517f46f71bfc12cdeebd17f8fc904 /ext/curl/interface.c | |
parent | ef2db26c60537e84b502608ff404263d5f4dc5d2 (diff) | |
parent | 968fbc6acf0bc27be17c0209be7f966e89a55943 (diff) | |
download | php-git-fe0ca2745f00940a27bfc8e87db534541a19af70.tar.gz |
Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r-- | ext/curl/interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8915625047..0423f71f9a 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -10,7 +10,7 @@ | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you 6 copy immediately. | + | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sterling Hughes <sterling@php.net> | +----------------------------------------------------------------------+ @@ -170,6 +170,12 @@ static int php_curl_option_url(php_curl *ch, const char *url, const int len TSRM #if LIBCURL_VERSION_NUM < 0x071100 char *copystr = NULL; #endif + + if (strlen(url) != len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Curl option contains invalid characters (\\0)"); + return 0; + } + /* Disable file:// if open_basedir are used */ if (PG(open_basedir) && *PG(open_basedir)) { #if LIBCURL_VERSION_NUM >= 0x071304 |