]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix unspecified comparison to null pointer [PR 97415]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 17:55:14 +0000 (18:55 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 17:55:14 +0000 (18:55 +0100)
commit78198b6021a9695054dab039340202170b88423c
tree26c5ba105ab29254b95c361a5c65b2f431003836
parent5b00bcc5432dc494c70f85ee717e4ecc47e7fcae
libstdc++: Fix unspecified comparison to null pointer [PR 97415]

The standard doesn't guarantee that null pointers compare less than
non-null pointers. AddressSanitizer complains about the pptr()> egptr()
comparison in basic_stringbuf::str() when egptr() is null.

libstdc++-v3/ChangeLog:

PR libstdc++/97415
* include/std/sstream (basic_stringbuf::str()): Check for
null egptr() before comparing to non-null pptr().
libstdc++-v3/include/std/sstream