Don't unwrap on bad zstd data (#27891)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
dc83f1ad38
commit
7bc0dd1bf6
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ where
|
|||
let received_at = Instant::now();
|
||||
match bytes? {
|
||||
WebSocketMessage::Binary(bytes) => {
|
||||
zstd::stream::copy_decode(bytes.as_slice(), &mut self.encoding_buffer).unwrap();
|
||||
zstd::stream::copy_decode(bytes.as_slice(), &mut self.encoding_buffer)?;
|
||||
let envelope = Envelope::decode(self.encoding_buffer.as_slice())
|
||||
.map_err(io::Error::from)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue