mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
- Fixed endless loop and segfault
This commit is contained in:
parent
4768abe05f
commit
9c9ee1a71c
3 changed files with 37 additions and 0 deletions
|
@ -157,6 +157,11 @@ static void text_iter_cp_next(text_iter_obj* object, long flags TSRMLS_DC)
|
|||
if (object->u.cp.offset == UBRK_DONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (object->text == NULL) {
|
||||
object->u.cp.offset = object->u.cp.cp_offset = UBRK_DONE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags & ITER_REVERSE) {
|
||||
U16_BACK_1(object->text, 0, object->u.cp.offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue