Merge remote-tracking branch 'origin/development'

# Conflicts:
#	include/etl/version.h
#	support/Release notes.txt
#	test/test_string_char.cpp
This commit is contained in:
John Wellbelove 2019-05-12 18:14:50 +01:00
parent 20fd786e42
commit 4977f39a3b
4 changed files with 20 additions and 1 deletions

View File

@ -437,6 +437,7 @@ namespace etl
current_size = new_size;
p_buffer[new_size] = 0;
cleanup();
}
//*********************************************************************

View File

@ -39,7 +39,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 14
#define ETL_VERSION_MINOR 23
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_PATCH 1
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH))

View File

@ -1,3 +1,7 @@
===============================================================================
14.23.1
Added missing 'cleanup' to string's resize() method.
===============================================================================
14.23.0
Added an optional secure mode to strings so that unused space will be cleared to zero

View File

@ -3689,6 +3689,20 @@ namespace
CHECK(std::find_if(text.end(), pe, [](Text::value_type x) { return x != 0; }) == pe);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_secure_after_resize_down)
{
Text text;
text.set_secure();
text.assign(STR("ABCDEF"));
Text::pointer pe = text.end();
text.resize(text.size() - 3U);
CHECK(std::find_if(text.end(), pe, [](Text::value_type x) { return x != 0; }) == pe);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_secure_after_erase)
{