[asterisk-commits] oej: branch 1.4 r59037 - /branches/1.4/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Mar 18 13:37:07 MST 2007


Author: oej
Date: Sun Mar 18 15:37:06 2007
New Revision: 59037

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59037
Log:
Issue #9313, Asterisk crash on SIP return code 0 (reported by qwerty1979)


Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=59037&r1=59036&r2=59037
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Sun Mar 18 15:37:06 2007
@@ -14612,6 +14612,10 @@
 		if (sscanf(e, "%d %n", &respid, &len) != 1) {
 			ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
 		} else {
+			if (respid <= 0) {
+				ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
+				return 0;
+			}
 			/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
 			if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
 				extract_uri(p, req);



More information about the asterisk-commits mailing list