[asterisk-commits] dbrooks: branch 1.4 r201380 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 17 13:45:59 CDT 2009


Author: dbrooks
Date: Wed Jun 17 13:45:50 2009
New Revision: 201380

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201380
Log:
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

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=201380&r1=201379&r2=201380
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Jun 17 13:45:50 2009
@@ -15518,6 +15518,10 @@
 
 	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);




More information about the asterisk-commits mailing list