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
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) {