Merge "Address CE CDM code review comments" into sc-dev

This commit is contained in:
Rahul Frias
2021-04-27 20:27:35 +00:00
committed by Android (Google) Code Review

View File

@@ -208,7 +208,7 @@ std::string b2a_hex(const std::string& byte) {
std::string HexEncode(const uint8_t* in_buffer, size_t size) {
static const char kHexChars[] = "0123456789ABCDEF";
if (size == 0) return "";
constexpr unsigned int kMaxSafeSize = 3072;
constexpr unsigned int kMaxSafeSize = 2048;
if (size > kMaxSafeSize) size = kMaxSafeSize;
// Each input byte creates two output hex characters.
std::string out_buffer(size * 2, '\0');