[svn-commits] dbrooks: trunk r201381 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 17 14:15:12 CDT 2009


Author: dbrooks
Date: Wed Jun 17 14:15:07 2009
New Revision: 201381

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201381
Log:
Merged revisions 201380 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r201380 | dbrooks | 2009-06-17 13:45:50 -0500 (Wed, 17 Jun 2009) | 9 lines
  
  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:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=201381&r1=201380&r2=201381
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jun 17 14:15:07 2009
@@ -21046,6 +21046,10 @@
 
 	memset(buf, 0, buflen);
 
+	if (p == NULL) {
+		return -1;
+	}
+
 	if (!strcasecmp(args.param, "peerip")) {
 		ast_copy_string(buf, p->sa.sin_addr.s_addr ? ast_inet_ntoa(p->sa.sin_addr) : "", buflen);
 	} else if (!strcasecmp(args.param, "recvip")) {




More information about the svn-commits mailing list