Module: kamailio
Branch: 5.0
Commit: 14560cbba998cbb5904ce279119afe4590d9660d
URL:
https://github.com/kamailio/kamailio/commit/14560cbba998cbb5904ce279119afe4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-10-25T10:20:43+02:00
dialog: safety check for handling http replies in cseq update code
- reported by GH #1277
(cherry picked from commit ba7f663a0f1da799fc7a8be9b86039af2862f287)
---
Modified: src/modules/dialog/dlg_cseq.c
---
Diff:
https://github.com/kamailio/kamailio/commit/14560cbba998cbb5904ce279119afe4…
Patch:
https://github.com/kamailio/kamailio/commit/14560cbba998cbb5904ce279119afe4…
---
diff --git a/src/modules/dialog/dlg_cseq.c b/src/modules/dialog/dlg_cseq.c
index 62e8ba3c79..716bde7cfb 100644
--- a/src/modules/dialog/dlg_cseq.c
+++ b/src/modules/dialog/dlg_cseq.c
@@ -59,12 +59,16 @@ static int dlg_cseq_prepare_msg(sip_msg_t *msg)
LM_DBG("prepare msg for cseq update operations\n");
if(msg->first_line.type==SIP_REQUEST) {
- if(!IS_SIP(msg))
- {
+ if(!IS_SIP(msg)) {
LM_DBG("non sip request message\n");
return 1;
}
- } else if(msg->first_line.type!=SIP_REPLY) {
+ } else if(msg->first_line.type==SIP_REPLY) {
+ if(!IS_SIP_REPLY(msg)) {
+ LM_DBG("non sip reply message\n");
+ return 1;
+ }
+ } else {
LM_DBG("non sip message\n");
return 1;
}