Skip to content
Snippets Groups Projects
Commit 142d4fef authored by Filip Jenicek's avatar Filip Jenicek Committed by Joshua Colp
Browse files

chan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c)

Asterisk may crash when calling ast_channel_get_t38_state(c)
on a locked channel which is being hung up.

ASTERISK-25609 #close

Change-Id: Ifaa707c04b865a290ffab719bd2e5c48ff667c7b
parent 28d92430
Branches
Tags
No related merge requests found
......@@ -4752,6 +4752,11 @@ static int sip_queryoption(struct ast_channel *chan, int option, void *data, int
struct sip_pvt *p = (struct sip_pvt *) ast_channel_tech_pvt(chan);
char *cp;
 
if (!p) {
ast_debug(1, "Attempt to Ref a null pointer. Sip private structure is gone!\n");
return -1;
}
sip_pvt_lock(p);
 
switch (option) {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment