Index: base/pickle.cc |
diff --git a/base/pickle.cc b/base/pickle.cc |
index d4487d45b24d61238309d3db48b1f17f4f2e0cca..7c8ffed4a266c270bf4256402312d353536157bf 100644 |
--- a/base/pickle.cc |
+++ b/base/pickle.cc |
@@ -254,9 +254,8 @@ Pickle::Pickle(const Pickle& other) |
header_size_(other.header_size_), |
capacity_after_header_(0), |
write_offset_(other.write_offset_) { |
- size_t payload_size = header_size_ + other.header_->payload_size; |
- Resize(payload_size); |
- memcpy(header_, other.header_, payload_size); |
+ Resize(other.header_->payload_size); |
+ memcpy(header_, other.header_, header_size_ + other.header_->payload_size); |
} |
Pickle::~Pickle() { |