| Index: net/quic/core/quic_data_reader.cc
|
| diff --git a/net/quic/core/quic_data_reader.cc b/net/quic/core/quic_data_reader.cc
|
| index 5f2c483338b349e30c36bade5560c222b637a4ee..2c2f9cd231300af530610e39c53830f5c1228ef1 100644
|
| --- a/net/quic/core/quic_data_reader.cc
|
| +++ b/net/quic/core/quic_data_reader.cc
|
| @@ -7,6 +7,7 @@
|
| #include "net/base/int128.h"
|
| #include "net/quic/core/quic_flags.h"
|
| #include "net/quic/core/quic_packets.h"
|
| +#include "net/quic/platform/api/quic_bug_tracker.h"
|
| #include "net/quic/platform/api/quic_endian.h"
|
| #include "net/quic/platform/api/quic_logging.h"
|
|
|
| @@ -154,4 +155,13 @@ void QuicDataReader::OnFailure() {
|
| pos_ = len_;
|
| }
|
|
|
| +uint8_t QuicDataReader::PeekByte() const {
|
| + if (pos_ >= len_) {
|
| + QUIC_BUG << "Reading is done, cannot peek next byte. Tried to read pos = "
|
| + << pos_ << " buffer length = " << len_;
|
| + return 0;
|
| + }
|
| + return data_[pos_];
|
| +}
|
| +
|
| } // namespace net
|
|
|