diff options
author | Felipe Pena <felipe@php.net> | 2008-09-22 13:09:09 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-09-22 13:09:09 +0000 |
commit | 084124fb37f6f94a27cf685699bd77b50a0184d3 (patch) | |
tree | 2157e265257d8d4ba8c6403cfafceb5587134f3f | |
parent | 498ffbc84f277da8367cd25dfd10e15612561c6f (diff) | |
download | php-git-084124fb37f6f94a27cf685699bd77b50a0184d3.tar.gz |
- MFH: Fixed bug #46088 (RegexIterator::accept - segfault)
-rwxr-xr-x | ext/spl/spl_iterators.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index f9111dba3c..475f3ccd44 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1689,7 +1689,11 @@ SPL_METHOD(RegexIterator, accept) char *subject, tmp[32], *result; int subject_len, use_copy, count, result_len; zval subject_copy, zcount, *replacement; - + + if (intern->current.data == NULL) { + RETURN_FALSE; + } + if (intern->u.regex.flags & REGIT_USE_KEY) { if (intern->current.key_type == HASH_KEY_IS_LONG) { subject_len = slprintf(tmp, sizeof(tmp), "%ld", intern->current.int_key); |