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

Unified Diff: content/browser/renderer_host/p2p/socket_host_test_utils.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 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 | « content/browser/renderer_host/p2p/socket_host_tcp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/p2p/socket_host_test_utils.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.cc b/content/browser/renderer_host/p2p/socket_host_test_utils.cc
index 1f56903c558dfb202f921a0a9b173b6827be83f2..36dc2eec9974547b3fddc314bda496b7c131df7d 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.cc
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.cc
@@ -196,8 +196,8 @@ void CreateRandomPacket(std::vector<char>* packet) {
static void CreateStunPacket(std::vector<char>* packet, uint16 type) {
CreateRandomPacket(packet);
*reinterpret_cast<uint16*>(&*packet->begin()) = base::HostToNet16(type);
- *reinterpret_cast<uint16*>(&*packet->begin() + 2) =
- base::HostToNet16(packet->size() - kStunHeaderSize);
+ *reinterpret_cast<uint16*>(&*packet->begin() + 2) = base::HostToNet16(
+ base::checked_cast<uint16>(packet->size() - kStunHeaderSize));
*reinterpret_cast<uint32*>(&*packet->begin() + 4) =
base::HostToNet32(kStunMagicCookie);
}
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698