From: Victor Julien Date: Thu, 18 Mar 2021 12:06:34 +0000 (+0100) Subject: nfs: add debug validation on file counts X-Git-Tag: suricata-6.0.4~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bed74c7fbc20535a92108707e28d27ff1e3a5991;p=thirdparty%2Fsuricata.git nfs: add debug validation on file counts (cherry picked from commit 1b3c3225cdc9d834d3a96aa239fb76b228859492) --- diff --git a/rust/src/nfs/nfs.rs b/rust/src/nfs/nfs.rs index 14290cd290..532ed0886e 100644 --- a/rust/src/nfs/nfs.rs +++ b/rust/src/nfs/nfs.rs @@ -215,6 +215,8 @@ impl NFSTransaction { } 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); }