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-7.0.0-beta1~1437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9cee7af4985d569b34dc080be615b19eb5180a9;p=thirdparty%2Fsuricata.git smb: add debug validation on file counts --- diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index bd563efc4b..054e65ab8e 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -566,6 +566,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); }