Skip to content

Commit

Permalink
dialog: check CSeq careful with track_cseq_updates
Browse files Browse the repository at this point in the history
to avoid null pointer access for malformed messages

(cherry picked from commit 59c7bf4)
  • Loading branch information
snen authored and miconda committed Jun 5, 2018
1 parent fa87c0b commit 12ddd12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/dialog/dlg_cseq.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 12ddd12

Please sign in to comment.