r267651 - in /trunk/libstdc++-v3: ChangeLog inc...
redi@gcc.gnu.org
redi@gcc.gnu.org
Mon Jan 7 14:58:00 GMT 2019
Author: redi
Date: Mon Jan 7 14:58:44 2019
New Revision: 267651
URL: https://gcc.gnu.org/viewcvs?rev=267651&root=gcc&view=rev
Log:
PR libstdc++/87787 avoid undefined null args to memcpy and memmove
The C++ char_traits and ctype APIs do not disallow null pointer
arguments, so we need explicit checks to ensure we don't forward null
pointers to memcpy or memmove.
PR libstdc++/87787
* include/bits/char_traits.h (char_traits::move): Do not pass null
pointers to memmove.
* include/bits/locale_facets.h
(ctype<char>::widen(const char*, const char*, char*)): Do not
pass null pointers to memcpy.
(ctype<char>::narrow(const char*, const char*, char, char*)):
Likewise.
(ctype<char>::do_widen(const char*, const char*, char*)):
Likewise.
(ctype<char>::do_narrow(const char*, const char*, char, char*)):
Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/char_traits.h
trunk/libstdc++-v3/include/bits/locale_facets.h
More information about the Libstdc++-cvs
mailing list