From: Victor Julien Date: Thu, 18 Mar 2021 12:06:22 +0000 (+0100) Subject: smb: add debug validation on file counts X-Git-Tag: suricata-6.0.4~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12e71ed090c6154a8732db618ea0f1f870b2353a;p=thirdparty%2Fsuricata.git smb: add debug validation on file counts (cherry picked from commit c9cee7af4985d569b34dc080be615b19eb5180a9) --- diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index 7a58016e09..c470bc140b 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -590,6 +590,8 @@ impl SMBTransaction { } pub fn free(&mut self) { + debug_validate_bug_on!(self.tx_data.files_opened > 1); + debug_validate_bug_on!(self.tx_data.files_logged > 1); if self.events != std::ptr::null_mut() { sc_app_layer_decoder_events_free_events(&mut self.events); }