Opened 16 years ago
Closed 16 years ago
#686 closed Bugs (Fixed)
regex_token_iterator can segfault
Reported by: | dakkar | Owned by: | John Maddock |
---|---|---|---|
Milestone: | Component: | regex | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
regex_token_iterator and u32regex_token_iterator can dereference a 0 pointer in the following case: - iterating over a string with no matches for the split regexp - asking for non-matches (the submatches array starts with -1) - incrementing the iterator the first time in the non-unicode version, nothing happens; but in the unicode version, the underlying u8_to_u32_iterator causes a segfault. I'm attaching a small test case, and a (seems working) patch.
Note:
See TracTickets
for help on using tickets.