]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
websocket: fixes substraction 13064/head
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 21 Apr 2025 19:16:38 +0000 (21:16 +0200)
committerPhilippe Antoine <pantoine@oisf.net>
Mon, 21 Apr 2025 19:16:38 +0000 (21:16 +0200)
Fixes: 16f74c68aaa9 ("websocket: use max window bits of 15")
rust/src/websocket/websocket.rs

index 3b86defe9cac38d7cfaa8f8904ce46161524671b..f86101743d4bb1922d5257145cab80535f7be4ed 100644 (file)
@@ -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
                                     };