From: David Brooks Date: Wed, 17 Jun 2009 18:45:50 +0000 (+0000) Subject: Checks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read() X-Git-Tag: 1.4.26~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebe2c1829b1f7fb80cdfae140f69a1f97e9e34e7;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7b225a6aa4..78709e422e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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) {