Merge "Address CE CDM code review comments" into sc-dev
This commit is contained in:
@@ -208,7 +208,7 @@ std::string b2a_hex(const std::string& byte) {
|
|||||||
std::string HexEncode(const uint8_t* in_buffer, size_t size) {
|
std::string HexEncode(const uint8_t* in_buffer, size_t size) {
|
||||||
static const char kHexChars[] = "0123456789ABCDEF";
|
static const char kHexChars[] = "0123456789ABCDEF";
|
||||||
if (size == 0) return "";
|
if (size == 0) return "";
|
||||||
constexpr unsigned int kMaxSafeSize = 3072;
|
constexpr unsigned int kMaxSafeSize = 2048;
|
||||||
if (size > kMaxSafeSize) size = kMaxSafeSize;
|
if (size > kMaxSafeSize) size = kMaxSafeSize;
|
||||||
// Each input byte creates two output hex characters.
|
// Each input byte creates two output hex characters.
|
||||||
std::string out_buffer(size * 2, '\0');
|
std::string out_buffer(size * 2, '\0');
|
||||||
|
|||||||
Reference in New Issue
Block a user