]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3709: smtp: decline fast-pattern buffer request when flow data is not...
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 19 Dec 2022 19:00:38 +0000 (19:00 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 19 Dec 2022 19:00:38 +0000 (19:00 +0000)
Merge in SNORT/snort3 from ~OSHUMEIK/snort3:fix_flow_data_check to master

Squashed commit of the following:

commit fb6ba7116e92a58b804f9fa752abb9a6afa97e81
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Mon Dec 19 14:26:47 2022 +0200

    smtp: decline fast-pattern buffer request when flow data is not present

src/service_inspectors/smtp/smtp.cc

index 19737a31c4ee61f65f2e86bb08932dd5c1d7a35f..e43a35c2181b7776babfd10103871d7973e231d3 100644 (file)
@@ -1583,7 +1583,9 @@ void Smtp::ProcessSmtpCmdsList(const SmtpCmd* sc)
 bool Smtp::get_fp_buf(InspectionBuffer::Type ibt, Packet* p, InspectionBuffer& b)
 {
     SMTPData* smtp_ssn = get_session_data(p->flow);
-    assert(smtp_ssn);
+
+    if (!smtp_ssn)
+        return false;
 
     const void* dst = nullptr;
     size_t dst_len = 0;