Index: net/quic/platform/impl/quic_ip_address_impl.cc |
diff --git a/net/quic/platform/impl/quic_ip_address_impl.cc b/net/quic/platform/impl/quic_ip_address_impl.cc |
index e0c58f14ec87d4601c10b8d955831e48b3ff2f29..6dd60845ceb00ecd7377ecfddea76b1896a86100 100644 |
--- a/net/quic/platform/impl/quic_ip_address_impl.cc |
+++ b/net/quic/platform/impl/quic_ip_address_impl.cc |
@@ -4,6 +4,7 @@ |
#include "net/quic/platform/impl/quic_ip_address_impl.h" |
+#include "base/containers/stack_container.h" |
#include "net/base/address_family.h" |
#include "net/quic/platform/api/quic_bug_tracker.h" |
@@ -107,9 +108,10 @@ bool QuicIpAddressImpl::FromPackedString(const char* data, size_t length) { |
QUIC_BUG << "Invalid packed IP address of length " << length; |
return false; |
} |
- std::vector<uint8_t> ip(length); |
+ base::StackVector<uint8_t, 16> ip; |
+ ip->resize(length); |
memcpy(&ip[0], data, length); |
- ip_address_ = IPAddress(ip); |
+ ip_address_ = IPAddress(ip->data(), ip->size()); |
eroman
2017/05/19 22:00:07
Delete the three lines above, and change this one
Ryan Hamilton
2017/05/20 03:21:44
Done. (needs a reinterpret_cast though. Thanks, C+
|
return true; |
} |