Merge "Address CE CDM code review comments" into sc-dev am: 9b3e37b038

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/14253246

Change-Id: I0bae63a3e43634bd93bd2a8745c27af64680b26d
This commit is contained in:
Rahul Frias
2021-04-27 20:52:16 +00:00
committed by Automerger Merge Worker

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');