| Index: base/base64.cc
|
| diff --git a/base/base64.cc b/base/base64.cc
|
| index 62bd12d1fb635f951f4ce7d2aa692cfb5a65aeab..f2c68230e3545f9175f5a391fa24b4f797841127 100644
|
| --- a/base/base64.cc
|
| +++ b/base/base64.cc
|
| @@ -14,7 +14,9 @@ bool Base64Encode(const StringPiece& input, std::string* output) {
|
|
|
| // null terminates result since result is base64 text!
|
| int input_size = static_cast<int>(input.size());
|
| - int output_size= modp_b64_encode(&(temp[0]), input.data(), input_size);
|
| +
|
| + // modp_b64_encode_len() returns at least 1, so temp[0] is safe to use.
|
| + int output_size = modp_b64_encode(&(temp[0]), input.data(), input_size);
|
| if (output_size < 0)
|
| return false;
|
|
|
|
|