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

Unified Diff: trunk/src/remoting/protocol/v2_authenticator.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
Index: trunk/src/remoting/protocol/v2_authenticator.cc
===================================================================
--- trunk/src/remoting/protocol/v2_authenticator.cc (revision 239920)
+++ trunk/src/remoting/protocol/v2_authenticator.cc (working copy)
@@ -156,7 +156,10 @@
while (!pending_messages_.empty()) {
const std::string& spake_message = pending_messages_.front();
std::string base64_message;
- base::Base64Encode(spake_message, &base64_message);
+ if (!base::Base64Encode(spake_message, &base64_message)) {
+ LOG(DFATAL) << "Cannot perform base64 encode on certificate";
+ continue;
+ }
buzz::XmlElement* eke_tag = new buzz::XmlElement(kEkeTag);
eke_tag->SetBodyText(base64_message);
@@ -168,7 +171,9 @@
if (!local_cert_.empty() && !certificate_sent_) {
buzz::XmlElement* certificate_tag = new buzz::XmlElement(kCertificateTag);
std::string base64_cert;
- base::Base64Encode(local_cert_, &base64_cert);
+ if (!base::Base64Encode(local_cert_, &base64_cert)) {
+ LOG(DFATAL) << "Cannot perform base64 encode on certificate";
+ }
certificate_tag->SetBodyText(base64_cert);
message->AddElement(certificate_tag);
certificate_sent_ = true;
« no previous file with comments | « trunk/src/remoting/protocol/pairing_registry.cc ('k') | trunk/src/sync/internal_api/public/base/unique_position_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698