[PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

Jonathan Wakely jwakely@redhat.com
Sat Feb 23 02:04:00 GMT 2019


On 23/02/19 02:06 +0100, Jakub Jelinek wrote:
>On Sat, Feb 23, 2019 at 01:02:20AM +0000, Jonathan Wakely wrote:
>> 	PR libstdc++/89446
>> 	* include/bits/char_traits.h (__constant_char_array): Check index is
>> 	in range before dereferencing.
>> 	* testsuite/21_strings/basic_string_view/operators/char/89446.cc:
>> 	New test.
>>
>> Tested x86_64-linux, committed to gcc-8-branch and gcc-7-branch.
>
>And not trunk?  The bug is still there, even when it should be usually
>ifdefed out because __builtin_is_constexpr_evaluated() should be supported.

Yes, that's a bigger patch (with some cleanup) which is coming
shortly.




More information about the Gcc-patches mailing list