Browse Source

Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen).

PHP-5.1
Ilia Alshanetsky 22 years ago
parent
commit
1e6454a67b
  1. 4
      ext/standard/string.c

4
ext/standard/string.c

@ -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…
Cancel
Save