Skip to content
Snippets Groups Projects
Commit 8372138c authored by Richard Mudgett's avatar Richard Mudgett
Browse files

chan_sip.c: Fix crash processing CANCEL.

Check if initreq data string exists before using it when processing a
CANCEL request.

ASTERISK-27666

Change-Id: Id1d0f0fa4ec94e81b332b2973d93e5a14bb4cc97
parent 04612861
No related branches found
No related tags found
No related merge requests found
......@@ -27425,7 +27425,7 @@ static int handle_request_cancel(struct sip_pvt *p, struct sip_request *req)
} else {
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
}
if (ast_str_strlen(p->initreq.data) > 0) {
if (p->initreq.data && ast_str_strlen(p->initreq.data) > 0) {
struct sip_pkt *pkt, *prev_pkt;
/* If the CANCEL we are receiving is a retransmission, and we already have scheduled
* a reliable 487, then we don't want to schedule another one on top of the previous
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment