[sr-dev] git:master:59c7bf4f: dialog: check CSeq careful with track_cseq_updates
Dmitri Savolainen
savolainen at erinaco.ru
Fri Jun 1 10:00:43 CEST 2018
Module: kamailio
Branch: master
Commit: 59c7bf4f43a8cd5dcb0555835a064d88679956c5
URL: https://github.com/kamailio/kamailio/commit/59c7bf4f43a8cd5dcb0555835a064d88679956c5
Author: Dmitri Savolainen <savolainen at erinaco.ru>
Committer: Dmitri Savolainen <savolainen at erinaco.ru>
Date: 2018-06-01T10:38:40+03:00
dialog: check CSeq careful with track_cseq_updates
to avoid null pointer access for malformed messages
---
Modified: src/modules/dialog/dlg_cseq.c
---
Diff: https://github.com/kamailio/kamailio/commit/59c7bf4f43a8cd5dcb0555835a064d88679956c5.diff
Patch: https://github.com/kamailio/kamailio/commit/59c7bf4f43a8cd5dcb0555835a064d88679956c5.patch
---
diff --git a/src/modules/dialog/dlg_cseq.c b/src/modules/dialog/dlg_cseq.c
index 1e343c9981..b97e8f7123 100644
--- a/src/modules/dialog/dlg_cseq.c
+++ b/src/modules/dialog/dlg_cseq.c
@@ -73,7 +73,8 @@ static int dlg_cseq_prepare_msg(sip_msg_t *msg)
return 1;
}
- if (parse_headers(msg, HDR_CSEQ_F, 0)==-1) {
+ if((!msg->cseq && (parse_headers(msg,HDR_CSEQ_F,0)<0 || !msg->cseq))
+ || !msg->cseq->parsed){
LM_DBG("parsing cseq header failed\n");
return 2;
}
More information about the sr-dev
mailing list