From: Stanislav Malyshev Date: Mon, 16 Jan 2017 01:33:48 +0000 (-0800) Subject: Merge branch 'PHP-7.1' X-Git-Tag: php-7.2.0alpha1~524 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=540e6728683b19ab9b1336650af06b3100422f02;p=php Merge branch 'PHP-7.1' * PHP-7.1: Update more functions with path check --- 540e6728683b19ab9b1336650af06b3100422f02 diff --cc ext/curl/curl_file.c index c18f365668,7a047feb7f..92378a6c6d --- a/ext/curl/curl_file.c +++ b/ext/curl/curl_file.c @@@ -31,20 -31,20 +31,20 @@@ PHP_CURL_API zend_class_entry *curl_CUR static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS) { - char *fname = NULL, *mime = NULL, *postname = NULL; - size_t fname_len, mime_len, postname_len; + zend_string *fname, *mime = NULL, *postname = NULL; zval *cf = return_value; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(1,3) - Z_PARAM_STR(fname) ++ Z_PARAM_PATH_STR(fname) + Z_PARAM_OPTIONAL + Z_PARAM_STR(mime) + Z_PARAM_STR(postname) + ZEND_PARSE_PARAMETERS_END(); - if (fname) { - zend_update_property_string(curl_CURLFile_class, cf, "name", sizeof("name")-1, fname); - } + zend_update_property_string(curl_CURLFile_class, cf, "name", sizeof("name")-1, ZSTR_VAL(fname)); if (mime) { - zend_update_property_string(curl_CURLFile_class, cf, "mime", sizeof("mime")-1, mime); + zend_update_property_string(curl_CURLFile_class, cf, "mime", sizeof("mime")-1, ZSTR_VAL(mime)); } if (postname) {