Merge branch 'PHP-8.0'

* PHP-8.0:
  fix bug #72998
This commit is contained in:
Joe Watkins committed 2021-06-03 10:34:00 +02:00
commit 5c3cb3583b
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -121,6 +121,9 @@ PHP NEWS
. Convert resource<pspell> to object \PSpell\Dictionary. (Sara)
. Convert resource<pspell config> to object \PSpell\Config. (Sara)
- readline:
. Fixed bug #72998 (invalid read in readline completion). (krakjoe)
- Reflection:
. Implement ReflectionFunctionAbstract::getClosureUsedVariables (krakjoe)
+2 -2
View File
@@ -452,12 +452,12 @@ char **php_readline_completion_cb(const char *text, int start, int end)
if (zend_hash_num_elements(Z_ARRVAL(_readline_array))) {
matches = rl_completion_matches(text,_readline_command_generator);
} else {
matches = malloc(sizeof(char *) * 2);
/* libedit will read matches[2] */
matches = calloc(sizeof(char *), 3);
if (!matches) {
return NULL;
}
matches[0] = strdup("");
matches[1] = NULL;
}
}
}