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

Unified Diff: net/quic/crypto/source_address_token.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « net/quic/crypto/quic_server_info.h ('k') | net/quic/crypto/source_address_token.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/source_address_token.h
diff --git a/net/quic/crypto/source_address_token.h b/net/quic/crypto/source_address_token.h
index f9a50988dd9e6e84de7f13c8028bfab85635a644..32f11c515f4439fb09b917775e5e081cfb901764 100644
--- a/net/quic/crypto/source_address_token.h
+++ b/net/quic/crypto/source_address_token.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
#include "net/quic/crypto/cached_network_parameters.h"
@@ -31,6 +32,8 @@ class NET_EXPORT_PRIVATE SourceAddressToken {
}
void set_ip(base::StringPiece ip) {
ip_ = ip.as_string();
+ DCHECK_LE(ip_.size(),
+ static_cast<size_t>(std::numeric_limits<char>::max()));
}
int64 timestamp() const {
« no previous file with comments | « net/quic/crypto/quic_server_info.h ('k') | net/quic/crypto/source_address_token.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698