mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix memory leak when calloc() fails in php_readline_completion_cb()
This commit is contained in:
4
NEWS
4
NEWS
@@ -12,6 +12,10 @@ PHP NEWS
|
|||||||
- Phar:
|
- Phar:
|
||||||
. Add missing filter cleanups on phar failure. (nielsdos)
|
. Add missing filter cleanups on phar failure. (nielsdos)
|
||||||
|
|
||||||
|
- Readline:
|
||||||
|
. Fix memory leak when calloc() fails in php_readline_completion_cb().
|
||||||
|
(nielsdos)
|
||||||
|
|
||||||
- SimpleXML:
|
- SimpleXML:
|
||||||
. Fixed bug GH-18597 (Heap-buffer-overflow in zend_alloc.c when assigning
|
. Fixed bug GH-18597 (Heap-buffer-overflow in zend_alloc.c when assigning
|
||||||
string with UTF-8 bytes). (nielsdos)
|
string with UTF-8 bytes). (nielsdos)
|
||||||
|
|||||||
@@ -473,13 +473,14 @@ char **php_readline_completion_cb(const char *text, int start, int end)
|
|||||||
/* libedit will read matches[2] */
|
/* libedit will read matches[2] */
|
||||||
matches = calloc(3, sizeof(char *));
|
matches = calloc(3, sizeof(char *));
|
||||||
if (!matches) {
|
if (!matches) {
|
||||||
return NULL;
|
goto out;
|
||||||
}
|
}
|
||||||
matches[0] = strdup("");
|
matches[0] = strdup("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
zval_ptr_dtor(¶ms[0]);
|
zval_ptr_dtor(¶ms[0]);
|
||||||
zval_ptr_dtor(&_readline_array);
|
zval_ptr_dtor(&_readline_array);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user