| Index: net/der/input.cc
|
| diff --git a/net/der/input.cc b/net/der/input.cc
|
| index 49955905fa2d1f3db570b8badb4362dab5763330..3b6037b124772bddde0e550b6f8cbda1ec345b20 100644
|
| --- a/net/der/input.cc
|
| +++ b/net/der/input.cc
|
| @@ -16,6 +16,18 @@ namespace der {
|
| Input::Input() : data_(nullptr), len_(0) {
|
| }
|
|
|
| +Input::Input(const Input& other, const Input& old_base, const Input& new_base)
|
| + : data_(other.data_ ? new_base.data_ + (other.data_ - old_base.data_)
|
| + : nullptr),
|
| + len_(other.len_) {
|
| + if (other.data_) {
|
| + DCHECK_EQ(new_base.len_, old_base.len_);
|
| + DCHECK_GE(data_, new_base.data_);
|
| + DCHECK_LE(data_ + len_, new_base.data_ + new_base.len_);
|
| + }
|
| + DCHECK(*this == other);
|
| +}
|
| +
|
| Input::Input(const uint8_t* data, size_t len) : data_(data), len_(len) {
|
| }
|
|
|
|
|