mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #803 from B1Z0N/master
Fixed memory leaks and out of bound access
This commit is contained in:
commit
a454d295ed
@ -1220,6 +1220,8 @@ TEST_CASE("md_access")
|
|||||||
expected += 3;
|
expected += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete[] image_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
|
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
|
||||||
@ -1616,6 +1618,8 @@ TEST_CASE("span_structure_size")
|
|||||||
multi_span<const double, dynamic_range, 6, 4> av2 =
|
multi_span<const double, dynamic_range, 6, 4> av2 =
|
||||||
as_multi_span(av1, dim(5), dim<6>(), dim<4>());
|
as_multi_span(av1, dim(5), dim<6>(), dim<4>());
|
||||||
(void) av2;
|
(void) av2;
|
||||||
|
|
||||||
|
delete[] arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
|
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
|
||||||
|
@ -234,8 +234,8 @@ void ostream_helper(T v)
|
|||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
std::ostringstream ref;
|
std::ostringstream ref;
|
||||||
os << p;
|
os << static_cast<void*>(p);
|
||||||
ref << &v;
|
ref << static_cast<void*>(&v);
|
||||||
CHECK(os.str() == ref.str());
|
CHECK(os.str() == ref.str());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user