From: Philippe Antoine Date: Mon, 21 Apr 2025 19:16:38 +0000 (+0200) Subject: websocket: fixes substraction X-Git-Tag: suricata-8.0.0-rc1~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13064%2Fhead;p=thirdparty%2Fsuricata.git websocket: fixes substraction Fixes: 16f74c68aaa9 ("websocket: use max window bits of 15") --- diff --git a/rust/src/websocket/websocket.rs b/rust/src/websocket/websocket.rs index 3b86defe9c..f86101743d 100644 --- a/rust/src/websocket/websocket.rs +++ b/rust/src/websocket/websocket.rs @@ -261,7 +261,7 @@ impl WebSocketState { let end = if v.len() + (dec.total_out() - before) as usize > max_pl_size as usize { - v.len() - max_pl_size as usize + max_pl_size as usize - v.len() } else { (dec.total_out() - before) as usize };