[asterisk-commits] mmichelson: branch 1.6.2 r202340 - in /branches/1.6.2: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 22 09:36:35 CDT 2009
Author: mmichelson
Date: Mon Jun 22 09:36:26 2009
New Revision: 202340
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202340
Log:
Merged revisions 202337 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r202337 | mmichelson | 2009-06-22 09:35:09 -0500 (Mon, 22 Jun 2009) | 31 lines
Merged revisions 202336 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r202336 | mmichelson | 2009-06-22 09:34:05 -0500 (Mon, 22 Jun 2009) | 25 lines
Fix a possible infinite loop in SDP parsing during glare situation.
There was a while loop in get_ip_and_port_from_sdp which was controlled
by a call to get_sdp_iterate. The loop would exit either if what we were
searching for was found or if the return was NULL. The problem is that
get_sdp_iterate never returns NULL. This means that if what we were searching
for was not present, the loop would run infinitely. This modification of the
loop fixes the problem.
(closes issue #15213)
Reported by: schmidts
(closes issue #15349)
Reported by: samy
(closes issue #14464)
Reported by: pj
(closes issue #15345)
Reported by: aragon
Patches:
sip_inf_loop.patch uploaded by mmichelson (license 60)
Tested by: aragon
........
................
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/channels/chan_sip.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=202340&r1=202339&r2=202340
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Mon Jun 22 09:36:26 2009
@@ -7485,7 +7485,7 @@
/* Continue since there may be a valid host in a c= line specific to the audio stream */
}
/* We only want the m and c lines for audio */
- while ((m = get_sdp_iterate(&miterator, req, "m"))) {
+ for (m = get_sdp_iterate(&miterator, req, "m"); !ast_strlen_zero(m); m = get_sdp_iterate(&miterator, req, "m")) {
if ((media == SDP_AUDIO && ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
(sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0))) ||
(media == SDP_VIDEO && ((sscanf(m, "video %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
More information about the asterisk-commits
mailing list