]> granicus.if.org Git - php/commitdiff
Disallow separation in a number of callbacks
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 06:59:19 +0000 (08:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 07:02:24 +0000 (09:02 +0200)
All of these clearly do not need separation support.

ext/curl/interface.c
ext/dom/xpath.c
ext/pcre/php_pcre.c
ext/sqlite3/sqlite3.c
ext/xml/xml.c
ext/xsl/xsltprocessor.c

index 0c416774f292a91a94fff06708cd3d40fbc2912b..6f5a79c42f255af6265e3b4a7ecfa53266ede5dc 100644 (file)
@@ -1385,7 +1385,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
                        fci.retval = &retval;
                        fci.param_count = 2;
                        fci.params = argv;
-                       fci.no_separation = 0;
+                       fci.no_separation = 1;
 
                        ch->in_callback = 1;
                        error = zend_call_function(&fci, &t->fci_cache);
@@ -1432,7 +1432,7 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
                        fci.retval = &retval;
                        fci.param_count = 3;
                        fci.params = argv;
-                       fci.no_separation = 0;
+                       fci.no_separation = 1;
 
                        ch->in_callback = 1;
                        error = zend_call_function(&fci, &t->fci_cache);
@@ -1485,7 +1485,7 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
                        fci.retval = &retval;
                        fci.param_count = 5;
                        fci.params = argv;
-                       fci.no_separation = 0;
+                       fci.no_separation = 1;
 
                        ch->in_callback = 1;
                        error = zend_call_function(&fci, &t->fci_cache);
@@ -1541,7 +1541,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
                        fci.retval = &retval;
                        fci.param_count = 3;
                        fci.params = argv;
-                       fci.no_separation = 0;
+                       fci.no_separation = 1;
 
                        ch->in_callback = 1;
                        error = zend_call_function(&fci, &t->fci_cache);
@@ -1603,7 +1603,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
                        fci.retval = &retval;
                        fci.param_count = 2;
                        fci.params = argv;
-                       fci.no_separation = 0;
+                       fci.no_separation = 1;
 
                        ch->in_callback = 1;
                        error = zend_call_function(&fci, &t->fci_cache);
index 7c63c33e869698e73d0c093e5b196f85759abc81..83a0581ce4b199c75885fc832f02824718aaa2dc 100644 (file)
@@ -151,7 +151,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
 
        fci.object = NULL;
        fci.retval = &retval;
-       fci.no_separation = 0;
+       fci.no_separation = 1;
 
        if (!zend_make_callable(&fci.function_name, &callable)) {
                php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable));
index 122373dea3d9dd12eafdfaaa7d2999ee9de25b36..7aaaf3f695d1776c2eaf5bc609101af0bd40fcd5 100644 (file)
@@ -1529,7 +1529,7 @@ static zend_string *preg_do_repl_func(zend_fcall_info *fci, zend_fcall_info_cach
        fci->retval = &retval;
        fci->param_count = 1;
        fci->params = &arg;
-       fci->no_separation = 0;
+       fci->no_separation = 1;
 
        if (zend_call_function(fci, fcc) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
                if (EXPECTED(Z_TYPE(retval) == IS_STRING)) {
index acb191c66598e3ccc0c677821aabd1716800e221..58696c01bb32d530124e8d0dcb457b7e8ef49846 100644 (file)
@@ -2146,7 +2146,7 @@ static int php_sqlite3_authorizer(void *autharg, int action, const char *arg1, c
        fci->retval = &retval;
        fci->param_count = 5;
        fci->params = argv;
-       fci->no_separation = 0;
+       fci->no_separation = 1;
 
        int authreturn = SQLITE_DENY;
 
index f3c877b87e61f892363569ab8b0d42d8b05bc526..60bdfb426144ea20805ca039139f85a210139032 100644 (file)
@@ -464,8 +464,7 @@ static void xml_call_handler(xml_parser *parser, zval *handler, zend_function *f
                fci.retval = retval;
                fci.param_count = argc;
                fci.params = argv;
-               fci.no_separation = 0;
-               /*fci.function_handler_cache = &function_ptr;*/
+               fci.no_separation = 1;
 
                result = zend_call_function(&fci, NULL);
                if (result == FAILURE) {
index 882adc1ee6af985b1b69a00aa407e93a32c6d713..b63814e236c5177078f8b1dde6d07bd214e6787c 100644 (file)
@@ -245,8 +245,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
        ZVAL_COPY_VALUE(&fci.function_name, &handler);
        fci.object = NULL;
        fci.retval = &retval;
-       fci.no_separation = 0;
-       /*fci.function_handler_cache = &function_ptr;*/
+       fci.no_separation = 1;
        if (!zend_make_callable(&handler, &callable)) {
                if (!EG(exception)) {
                        php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable));