aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-12-09 09:58:56 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2019-12-09 09:58:56 +0000
commit023a3fb4915841a3eb469b71cf642b5763163e14 (patch)
treed7e6eb53a9cc6a33f719349821e7e1caeed54a8a /gcc/tree-vect-patterns.c
parenta65d584dc1aaaad77af0a8e2ab36a29729d6e056 (diff)
downloadgcc-023a3fb4915841a3eb469b71cf642b5763163e14.zip
gcc-023a3fb4915841a3eb469b71cf642b5763163e14.tar.gz
gcc-023a3fb4915841a3eb469b71cf642b5763163e14.tar.bz2
libstdc++: fix buffer overflow in path::operator+= (PR92853)
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 (filesystem::path::operator+=(const path&)): Do not process a trailing directory separator twice. * testsuite/27_io/filesystem/path/concat/92853.cc: New test. * testsuite/27_io/filesystem/path/concat/path.cc: Test more cases. From-SVN: r279110
Diffstat (limited to 'gcc/tree-vect-patterns.c')
0 files changed, 0 insertions, 0 deletions