]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #658 in SNORT/snort3 from sip_war to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 6 Oct 2016 20:58:12 +0000 (16:58 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 6 Oct 2016 20:58:12 +0000 (16:58 -0400)
Squashed commit of the following:

commit 0fc3a2e2090c98bb59dc9b807ad67c1cb71d70ab
Author: huica <huica@cisco.com>
Date:   Thu Oct 6 13:46:24 2016 -0400

    Fix warnings from analysis

src/service_inspectors/sip/sip_dialog.cc

index 0d1701440816cc9f2cd7eff15ecf008fc5a7a817..2ebbe9fa7a966d33a1597b598bcd617e3d26c6b5 100644 (file)
@@ -78,7 +78,8 @@ static int SIP_processRequest(SIPMsg* sipMsg, SIP_DialogData* dialog, SIP_Dialog
     /*If dialog not exist, create one */
     if ((NULL == dialog)&&(SIP_METHOD_CANCEL != sipMsg->methodFlag))
     {
-        dialog = SIP_addDialog(sipMsg, dList->head, dList);
+        // Clang analyzer is false positive, dlist->head is updated after free
+        dialog = SIP_addDialog(sipMsg, dList->head, dList); // FIXIT-A
     }
 
     methodFlag = sipMsg->methodFlag;
@@ -763,6 +764,7 @@ int SIP_updateDialog(SIPMsg* sipMsg, SIP_DialogList* dList, Packet* p, SIP_PROTO
     else
         ret = false;
 
+#if 0
     for (dialog = dList->head;
         dialog;
         dialog = dialog->nextD)
@@ -770,7 +772,7 @@ int SIP_updateDialog(SIPMsg* sipMsg, SIP_DialogList* dList, Packet* p, SIP_PROTO
         if (sipMsg->dlgID.callIdHash == dialog->dlgID.callIdHash)
             break;
     }
-
+#endif
     //sip_update_appid(p, sipMsg, dialog);
 
     return ret;