]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/filesystem/path/append/source.cc
libstdc++: Fix out-of-bounds string_view access in filesystem::path [PR 97167]
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / filesystem / path / append / source.cc
index 2fceee9b77416f9c425bf7b225809e192bae9bea..dc7331945fe9ff6565cba77d66d8e0e0e7e613c2 100644 (file)
@@ -161,6 +161,15 @@ test06()
   test(p2, s.c_str());
 }
 
+void
+test07()
+{
+  path p, p0;
+  std::string_view s;
+  p /= s; // PR libstdc++/97167
+  compare_paths(p, p0);
+}
+
 int
 main()
 {
@@ -170,4 +179,5 @@ main()
   test04();
   test05();
   test06();
+  test07();
 }