From: Ville Voutilainen Date: Mon, 26 Sep 2016 09:46:19 +0000 (+0300) Subject: re PR libstdc++/77717 (testsuite/21_strings/basic_string_view/operations/compare... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a38814c0038fb4bf756547a3f50d125da0066737;p=gcc.git re PR libstdc++/77717 (testsuite/21_strings/basic_string_view/operations/compare/char/1.cc makes undefined memcmp call) PR libstdc++/77717 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: Fix an out-of-bounds access. From-SVN: r240486 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 230f764fd6f..e3e26d1440c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2016-09-26 Ville Voutilainen + + PR libstdc++/77717 + * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: + Fix an out-of-bounds access. + 2016-09-26 Marek Polacek PR c/7652 diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc index 77188b3eba1..28e2514d016 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc @@ -82,8 +82,8 @@ test01() test_value(strncmp(str_1.data(), str_0.data(), 6), z); test_value(strncmp(str_1.data(), str_0.data(), 14), lt); test_value(memcmp(str_1.data(), str_0.data(), 6), z); - test_value(memcmp(str_1.data(), str_0.data(), 14), lt); - test_value(memcmp("costa marbella", "costa rica", 14), lt); + test_value(memcmp(str_1.data(), str_0.data(), 10), lt); + test_value(memcmp("costa marbella", "costa rica", 10), lt); // int compare(const basic_string_view& str) const; test_value(str_0.compare(str_1), gt); //because r>m