[asterisk-commits] markm: branch 1.10 r328611 - in /branches/1.10:	./ channels/chan_sip.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Mon Jul 18 07:56:53 CDT 2011
    
    
  
Author: markm
Date: Mon Jul 18 07:56:49 2011
New Revision: 328611
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=328611
Log:
Merged revisions 328608 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
  r328608 | markm | 2011-07-18 08:35:57 -0400 (Mon, 18 Jul 2011) | 9 lines
  
  If the sip private structure is null, sip_setoption() will defref the null pointer and crash.
  
  Ideally, sip_setoption shouldn't be called if there is a lack of a sip private structure.  But this will fix a crash.
  
  (closes issue ASTERISK-17909)
  Reported by: Mark Murawski
  Tested by: Mark Murawski
........
Modified:
    branches/1.10/   (props changed)
    branches/1.10/channels/chan_sip.c
Propchange: branches/1.10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/1.10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.10/channels/chan_sip.c?view=diff&rev=328611&r1=328610&r2=328611
==============================================================================
--- branches/1.10/channels/chan_sip.c (original)
+++ branches/1.10/channels/chan_sip.c Mon Jul 18 07:56:49 2011
@@ -4266,6 +4266,11 @@
 	int res = -1;
 	struct sip_pvt *p = chan->tech_pvt;
 
+        if (!p) {
+        	ast_log(LOG_ERROR, "Attempt to Ref a null pointer.  sip private structure is gone!\n");
+        	return -1;
+        }
+
 	sip_pvt_lock(p);
 
 	switch (option) {
    
    
More information about the asterisk-commits
mailing list