Module: kamailio Branch: master Commit: 5c38b53b902949fa48c3bc60288514cd7c555d5b URL: https://github.com/kamailio/kamailio/commit/5c38b53b902949fa48c3bc60288514cd...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-05-26T19:24:49+02:00
dialog: check for message struct before accessing the fields
- for build_dlg_t_early()
---
Modified: src/modules/dialog/dlg_req_within.c
---
Diff: https://github.com/kamailio/kamailio/commit/5c38b53b902949fa48c3bc60288514cd... Patch: https://github.com/kamailio/kamailio/commit/5c38b53b902949fa48c3bc60288514cd...
---
diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c index 7645ebeca37..9ffd65e9526 100644 --- a/src/modules/dialog/dlg_req_within.c +++ b/src/modules/dialog/dlg_req_within.c @@ -494,7 +494,12 @@ dlg_t *build_dlg_t_early( goto error; }
- if(msg == NULL || msg->first_line.type != SIP_REPLY) { + if(msg == NULL) { + LM_ERR("no sip message\n"); + goto error; + } + + if(msg->first_line.type != SIP_REPLY) { if(!cell->t) { LM_ERR("no transaction associated\n"); goto error;