From 787e7ef616c7fec78d687324168c8d84d5349d37 Mon Sep 17 00:00:00 2001 From: B1Z0N Date: Sun, 1 Sep 2019 00:35:04 +0300 Subject: [PATCH 1/2] Thanks to @stayprivates fixed out of bounds access in "TestNotNullostream" --- tests/notnull_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp index ce5a123..010dd00 100644 --- a/tests/notnull_tests.cpp +++ b/tests/notnull_tests.cpp @@ -234,8 +234,8 @@ void ostream_helper(T v) { std::ostringstream os; std::ostringstream ref; - os << p; - ref << &v; + os << static_cast(p); + ref << static_cast(&v); CHECK(os.str() == ref.str()); } { From d5382a293b9d7cd9e3ec87cc04f388188d38c838 Mon Sep 17 00:00:00 2001 From: B1Z0N Date: Sun, 1 Sep 2019 00:36:13 +0300 Subject: [PATCH 2/2] Fixed memory leaks --- tests/multi_span_tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp index 7e3ec89..17188be 100644 --- a/tests/multi_span_tests.cpp +++ b/tests/multi_span_tests.cpp @@ -1220,6 +1220,8 @@ TEST_CASE("md_access") expected += 3; } } + + delete[] image_ptr; } GSL_SUPPRESS(con.4) // NO-FORMAT: attribute @@ -1616,6 +1618,8 @@ TEST_CASE("span_structure_size") multi_span av2 = as_multi_span(av1, dim(5), dim<6>(), dim<4>()); (void) av2; + + delete[] arr; } GSL_SUPPRESS(con.4) // NO-FORMAT: attribute