[PATCH] libstdc++: fix buffer overflow in path::operator+= (PR92853)

2019-12-09 Thread Jonathan Wakely
When concatenating a path ending in a root-directory onto another path, we added an empty filename to the end of the path twice, but only reserved space for one. That meant the second write went past the end of the allocated buffer. PR libstdc++/92853 * src/c++17/fs_path.cc (files

Re: [PATCH] libstdc++: fix buffer overflow in path::operator+= (PR92853)

2019-12-09 Thread Jonathan Wakely
On 09/12/19 09:55 +, Jonathan Wakely wrote: When concatenating a path ending in a root-directory onto another path, we added an empty filename to the end of the path twice, but only reserved space for one. That meant the second write went past the end of the allocated buffer. PR libs