From eb250e5512ac0ce75e4d3937b33481dadb77c7de Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 18 May 2021 09:52:53 +0200 Subject: [PATCH] http2: remove assertion which can be wrong Brotli decoder stops consuming input it it reaches the end of its input (cherry picked from commit b3c502d572693368aba277d28aefc9c9cfe685af) --- rust/src/http2/decompression.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/http2/decompression.rs b/rust/src/http2/decompression.rs index 518a8e3201..33aefb2876 100644 --- a/rust/src/http2/decompression.rs +++ b/rust/src/http2/decompression.rs @@ -135,8 +135,8 @@ fn http2_decompress<'a>( } } } - //checks all input was consumed - debug_validate_bug_on!(decoder.get_mut().position() < (input.len() as u64)); + //brotli does not consume all input if it reaches some end + decoder.get_mut().set_position(0); return Ok(&output[..offset]); } -- 2.47.2