diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-11 18:37:05 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-18 15:15:37 +0000 |
commit | 56fa6ce15f39f565060ab2b006b770057b5da99e (patch) | |
tree | ec695fc5ff2d682ea0ac84fc9405cf0797724a9d /tests | |
parent | rpc: guard against json parsing a non object (diff) | |
download | monero-56fa6ce15f39f565060ab2b006b770057b5da99e.tar.xz |
tests: fix a buffer overread in a unit test
and remove a leftover debugging sanity check
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit_tests/slow_memmem.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/unit_tests/slow_memmem.cpp b/tests/unit_tests/slow_memmem.cpp index 0312019be..6e1dcb85f 100644 --- a/tests/unit_tests/slow_memmem.cpp +++ b/tests/unit_tests/slow_memmem.cpp @@ -81,7 +81,6 @@ static const struct { {1,"x",1,"x",0}, {2,"x",1,"",1}, {1,"x",1,"",0}, - {1,"x",2,"",0}, {1,"x",2,"x",0}, {2,"ax",2,"x",0}, {1,"xx",2,"xx",0}, @@ -103,7 +102,7 @@ static const struct { {8,"xxxxxxab",3,"xyz",0}, {8,"xxxxxxab",6,"abcdef",0}, {9,"\0xxxxxab",3,"ab",6}, - {4,"\0\0a",3,"\0a",1}, + {4,"\0\0a",3,"\0a",1}, // }; TEST(slowmem,Success) @@ -122,7 +121,6 @@ TEST(slowmem,Success) free(pat); free(buf); ASSERT_EQ(res,T[n].res); -ASSERT_EQ(1,1); #ifdef VERBOSE if (res!=T[n].res) printf("failed (got %zu, expected %zu)",res,T[n].res); else printf("ok"); printf("\n"); |