]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #3051 in SNORT/snort3 from ~BSACHDEV/snort3:smb_crash to master
authorBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Tue, 14 Sep 2021 06:33:00 +0000 (06:33 +0000)
committerBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Tue, 14 Sep 2021 06:33:00 +0000 (06:33 +0000)
Squashed commit of the following:

commit 8ce04eac431afcc03615fd2e6cda04d6a88522d3
Author: bsachdev <bsachdev@cisco.com>
Date:   Wed Sep 8 00:43:10 2021 -0400

    smb: added a null check when current_flow is not present

Signed-off-by: bsachdev <bsachdev@cisco.com>
src/service_inspectors/dce_rpc/dce_smb2_file.cc

index 9e13447736a58c4a91f0ac50045caaed0e73e0e7..798087405872e16748ed34b1005875af020c9d1e 100644 (file)
@@ -151,6 +151,8 @@ bool Dce2Smb2FileTracker::process_data(const uint32_t current_flow_key, const ui
     uint32_t data_size)
 {
     Dce2Smb2SessionData* current_flow = parent_tree->get_parent()->get_flow(current_flow_key);
+    if (!current_flow)
+        return true;
 
     if (parent_tree->get_share_type() != SMB2_SHARE_TYPE_DISK)
     {