ensure SIP_HEADER does not segfault when called on hung-up channels (bug #4756, different fix than posted patch)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Kevin P. Fleming 20 years ago
parent cd17218e59
commit dd1cd37f11

@ -8158,6 +8158,13 @@ static char *func_header_read(struct ast_channel *chan, char *cmd, char *data, c
}
p = chan->tech_pvt;
/* If there is no private structure, this channel is no longer alive */
if (!p) {
ast_mutex_unlock(&chan->lock);
return NULL;
}
content = get_header(&p->initreq, data);
if (ast_strlen_zero(content)) {

Loading…
Cancel
Save