diff options
author | dbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-17 18:45:50 +0000 |
---|---|---|
committer | dbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-17 18:45:50 +0000 |
commit | 0cf3e2ad141adce093dbc3b53d1580dffb5e822f (patch) | |
tree | 51b63f30a262b1c7d504b11c5f75b026d7a2d973 /channels | |
parent | 290102abe3d3e10db82ad469d1cdf434dc186a60 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@201380 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7b225a6aa..78709e422 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) { |