Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Unified Diff: base/base64.cc

Issue 10406022: Address outstanding comments from CL 10384140 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/me2me_preference_pane.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | remoting/host/me2me_preference_pane.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698