[asterisk-commits] markm: trunk r328612 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 18 07:58:06 CDT 2011


Author: markm
Date: Mon Jul 18 07:58:02 2011
New Revision: 328612

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=328612
Log:
Merged revisions 328611 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328611 | markm | 2011-07-18 08:56:49 -0400 (Mon, 18 Jul 2011) | 15 lines
  
  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:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.10-merged (original)
+++ branch-1.10-merged Mon Jul 18 07:58:02 2011
@@ -1,1 +1,1 @@
-/branches/1.10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609
+/branches/1.10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609,328611

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=328612&r1=328611&r2=328612
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jul 18 07:58:02 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