Use stdext::make_checked_array_iterator for reverse_copy on VS2008 and above (Issue 123)

pull/136/head
Jeffrey Walton 2016-02-05 02:43:08 -05:00
parent d55d7fe90a
commit f45813bd12
1 changed files with 9 additions and 5 deletions

View File

@ -2895,8 +2895,12 @@ Integer::Integer(const byte *encodedInteger, size_t byteCount, Signedness s, Byt
if(o == LITTLE_ENDIAN_ORDER)
{
SecByteBlock block(byteCount);
#if (CRYPTOPP_MSC_VERSION >= 1500)
std::reverse_copy(encodedInteger, encodedInteger+byteCount,
stdext::make_checked_array_iterator(block.begin(), block.size()));
#else
std::reverse_copy(encodedInteger, encodedInteger+byteCount, block.begin());
#endif
Decode(block.begin(), block.size(), s);
return;
}