mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
unit_tests: add check for page size > 0 before dividing
Coverity 188426
This commit is contained in:
parent
d8b1ec8b8b
commit
a085da3247
1 changed files with 1 additions and 0 deletions
|
@ -158,6 +158,7 @@ TEST(mlocker, cross_page)
|
|||
TEST(mlocker, redundant)
|
||||
{
|
||||
const size_t page_size = epee::mlocker::get_page_size();
|
||||
ASSERT_TRUE(page_size > 0);
|
||||
const size_t base_pages = epee::mlocker::get_num_locked_pages();
|
||||
const size_t base_objects = epee::mlocker::get_num_locked_objects();
|
||||
std::unique_ptr<char[]> data{new char[2 * page_size]};
|
||||
|
|
Loading…
Reference in a new issue