Skip to content
Snippets Groups Projects
Commit 59a91c35 authored by Filip Jenicek's avatar Filip Jenicek Committed by Richard Mudgett
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 65c81479
Branches
Tags
No related merge requests found
...@@ -4757,6 +4757,11 @@ static int sip_queryoption(struct ast_channel *chan, int option, void *data, int ...@@ -4757,6 +4757,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); struct sip_pvt *p = (struct sip_pvt *) ast_channel_tech_pvt(chan);
char *cp; 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); sip_pvt_lock(p);
   
switch (option) { switch (option) {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment