| Index: net/quic/crypto/crypto_framer.cc
|
| diff --git a/net/quic/crypto/crypto_framer.cc b/net/quic/crypto/crypto_framer.cc
|
| index 79e17edbf1b79beffe1d6382d81f135f28c89461..196883765a412ed68511490cb00c362f5183531c 100644
|
| --- a/net/quic/crypto/crypto_framer.cc
|
| +++ b/net/quic/crypto/crypto_framer.cc
|
| @@ -106,8 +106,8 @@ QuicData* CryptoFramer::ConstructHandshakeMessage(
|
| return nullptr;
|
| }
|
|
|
| -
|
| - QuicDataWriter writer(len);
|
| + scoped_ptr<char[]> buffer(new char[len]);
|
| + QuicDataWriter writer(len, buffer.get());
|
| if (!writer.WriteUInt32(message.tag())) {
|
| DCHECK(false) << "Failed to write message tag.";
|
| return nullptr;
|
| @@ -181,7 +181,7 @@ QuicData* CryptoFramer::ConstructHandshakeMessage(
|
| }
|
| }
|
|
|
| - return new QuicData(writer.take(), len, true);
|
| + return new QuicData(buffer.release(), len, true);
|
| }
|
|
|
| void CryptoFramer::Clear() {
|
|
|