From: Shilpa Nagpal (shinagpa) Date: Fri, 5 Sep 2025 10:23:40 +0000 (+0000) Subject: Pull request #4882: file_api: Block Archive file during FTPS transfer X-Git-Tag: 3.9.6.0~28 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=31e69774248baba96798982cb03d445c5c61ba4b;p=thirdparty%2Fsnort3.git Pull request #4882: file_api: Block Archive file during FTPS transfer Merge in SNORT/snort3 from ~SHINAGPA/snort3:file_ftps_fix to master Squashed commit of the following: commit 2665b8645cc3a2ddbaedff10cb0b00a8f5e3e49d Author: Shilpa Nagpal Date: Tue Aug 26 15:07:35 2025 +0530 file_api: set file size when file size is middle and data flushed --- diff --git a/src/file_api/file_lib.cc b/src/file_api/file_lib.cc index 127cd2a4c..438c99736 100644 --- a/src/file_api/file_lib.cc +++ b/src/file_api/file_lib.cc @@ -1044,6 +1044,10 @@ void FileContext::update_file_size(int data_size, FilePosition position) processed_bytes = 0; processing_complete = true; } + else if ((position == SNORT_FILE_MIDDLE) and sha256) + { + file_size = processed_bytes; + } } uint64_t FileContext::get_processed_bytes()