diff options
author | David Bolvansky <david.bolvansky@gmail.com> | 2019-09-17 17:17:30 +0000 |
---|---|---|
committer | David Bolvansky <david.bolvansky@gmail.com> | 2019-09-17 17:17:30 +0000 |
commit | d5f68535b6a1fbb4f8afed3d999d965861bb8a4d (patch) | |
tree | 6e78a3ca810787f0893084ee9e787f76136f9c60 | |
parent | 0254289ab2423cec855044848ccca817ae0f45de (diff) | |
download | compiler-rt-d5f68535b6a1fbb4f8afed3d999d965861bb8a4d.tar.gz |
Remove asan test for strncat(x, y, 0)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@372143 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/asan/tests/asan_str_test.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/asan/tests/asan_str_test.cpp b/lib/asan/tests/asan_str_test.cpp index 50e1ab441..33a38a815 100644 --- a/lib/asan/tests/asan_str_test.cpp +++ b/lib/asan/tests/asan_str_test.cpp @@ -454,12 +454,10 @@ TEST(AddressSanitizer, StrNCatOOBTest) { size_t from_size = Ident(20); char *from = MallocAndMemsetString(from_size); // Normal strncat calls. - strncat(to, from, 1); + strncat(to, from, 0); strncat(to, from, from_size); from[from_size - 1] = '\0'; strncat(to, from, 2 * from_size); - // Catenating empty string with an invalid string is still an error. - EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBAccessMessage(1)); strncat(to, from + from_size - 1, 10); // One of arguments points to not allocated memory. EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBAccessMessage(1)); |