siptrace: safety check for tm callback parameter 1931/head
authoriionita <ionut-razvan.ionita@1and1.ro>
Mon, 22 Apr 2019 14:44:59 +0000 (17:44 +0300)
committeriionita <ionut-razvan.ionita@1and1.ro>
Tue, 23 Apr 2019 05:25:06 +0000 (08:25 +0300)
Found via coverity scan.

src/modules/siptrace/siptrace.c

index c34d25d..e559d78 100644 (file)
@@ -1956,6 +1956,12 @@ static void trace_dialog_transaction(struct dlg_cell* dlg, int type, struct dlg_
                return;
        }
 
+       /* coverity fix - there shouldn't be a scenario for this to happen */
+       if (params == NULL) {
+               LM_ERR("NULL tm params!\n");
+               return;
+       }
+
        /**
         * DUAL BYE - internally generated BYE from kamailio
         * set flag to signal request_in callback which will register