]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http2: do not append data after closing file 9224/head
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 12 Jul 2023 07:42:47 +0000 (09:42 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 13 Jul 2023 05:05:07 +0000 (07:05 +0200)
Ticket: #6211

Completes commit 02dece5db5170ae9bd946d0b8805e45ac071a97c

Once a http2 stream has end of stream flag, we close the file.
If we see new data frames with this stream id, the new_chunk
function should ignore them as the file was already closed.

rust/src/filetracker.rs

index d35126d7aed3387ed5ae8de39c3d983f26d68098..ad1c4c0c3a2cdfcdd1fa245674cf699e7d2b4138 100644 (file)
@@ -152,7 +152,7 @@ impl FileTransferTracker {
         self.fill_bytes = fill_bytes;
         self.chunk_is_last = is_last;
 
-        if self.file_is_truncated {
+        if self.file_is_truncated || self.file_closed {
             return 0;
         }
         if !self.file_open {