[Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor
Jonathan Wakely
jwakely@redhat.com
Wed Oct 22 23:04:00 GMT 2014
On 22/10/14 14:53 -0700, Tim Shen wrote:
>On Wed, Oct 22, 2014 at 7:34 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>> Only if it's likely to catch problems in future. If you'd be putting
>> it in only to make a testcase fail then it's not worth it.
>
>No, since I think with this patch _M_current is clearly valid when
>being dereferenced.
>
>> You could even simplify it further using std::prev:
>>
>> if (_M_is_word(*std::prev(__pre)))
>> __left_is_word = true;
>
>Done.
OK to commit, thanks!
More information about the Libstdc++
mailing list