// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "quiche/http2/decoder/http2_structure_decoder.h" #include <algorithm> #include <cstring> #include "quiche/common/platform/api/quiche_bug_tracker.h" namespace http2 { // Below we have some defensive coding: if we somehow run off the end, don't // overwrite lots of memory. Note that most of this decoder is not defensive // against bugs in the decoder, only against malicious encoders, but since // we're copying memory into a buffer here, let's make sure we don't allow a // small mistake to grow larger. The decoder will get stuck if we hit the // QUICHE_BUG conditions, but shouldn't corrupt memory. uint32_t Http2StructureDecoder::IncompleteStart(DecodeBuffer* db, uint32_t target_size) { … } DecodeStatus Http2StructureDecoder::IncompleteStart(DecodeBuffer* db, uint32_t* remaining_payload, uint32_t target_size) { … } bool Http2StructureDecoder::ResumeFillingBuffer(DecodeBuffer* db, uint32_t target_size) { … } bool Http2StructureDecoder::ResumeFillingBuffer(DecodeBuffer* db, uint32_t* remaining_payload, uint32_t target_size) { … } } // namespace http2