Checks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read()

Zombie channels could be passed, and chan_sip.c wasn't checking for it.
Could crash Asterisk. Now checking for NULL pointer.

(closes issue #15330)
Reported by: okrief
Tested by: dbrooks


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@201380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
David Brooks 17 years ago
parent b8417b571b
commit ebe2c1829b

@ -15519,6 +15519,10 @@ static int acf_channel_read(struct ast_channel *chan, char *funcname, char *prep
memset(buf, 0, buflen);
memset(&qos, 0, sizeof(qos));
if (p == NULL) {
return -1;
}
if (strcasecmp(args.type, "AUDIO") == 0) {
all = ast_rtp_get_quality(p->rtp, &qos);
} else if (strcasecmp(args.type, "VIDEO") == 0) {

Loading…
Cancel
Save