mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen).
This commit is contained in:
parent
64e40c2271
commit
1e6454a67b
1 changed files with 4 additions and 0 deletions
|
@ -1890,6 +1890,10 @@ PHP_FUNCTION(chunk_split)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (chunklen > Z_STRLEN_PP(p_str)) {
|
||||
RETURN_STRINGL(Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str), 1);
|
||||
}
|
||||
|
||||
if (!Z_STRLEN_PP(p_str)) {
|
||||
RETURN_EMPTY_STRING();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue