[asterisk-commits] twilson: trunk r324238 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 20 12:34:49 CDT 2011
Author: twilson
Date: Mon Jun 20 12:34:45 2011
New Revision: 324238
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324238
Log:
Merged revisions 324237 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r324237 | twilson | 2011-06-20 12:33:07 -0500 (Mon, 20 Jun 2011) | 12 lines
Ignore media offers with a port of 0
Section 5.1 of RFC3264 states:
A port number of zero in the offer indicates that the stream is offered
but MUST NOT be used.
(closes issue ASTERISK-17845)
Reported by: jacco
Patches:
issue19281_2.patch uploaded by jacco (license 1277)
Tested by: jacco, twilson
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=324238&r1=324237&r2=324238
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun 20 12:34:45 2011
@@ -8789,8 +8789,8 @@
nextm = get_sdp_iterate(&next, req, "m");
/* Search for audio media definition */
- if ((sscanf(m, "audio %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0) ||
- (sscanf(m, "audio %30u RTP/%4s %n", &x, protocol, &len) == 2 && len > 0)) {
+ if ((sscanf(m, "audio %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0 && x) ||
+ (sscanf(m, "audio %30u RTP/%4s %n", &x, protocol, &len) == 2 && len > 0 && x)) {
if (!strcmp(protocol, "SAVP")) {
secure_audio = 1;
} else if (strcmp(protocol, "AVP")) {
@@ -8817,8 +8817,8 @@
ast_rtp_codecs_payloads_set_m_type(&newaudiortp, NULL, codec);
}
/* Search for video media definition */
- } else if ((sscanf(m, "video %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0) ||
- (sscanf(m, "video %30u RTP/%4s %n", &x, protocol, &len) == 2 && len >= 0)) {
+ } else if ((sscanf(m, "video %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0 && x) ||
+ (sscanf(m, "video %30u RTP/%4s %n", &x, protocol, &len) == 2 && len >= 0 && x)) {
if (!strcmp(protocol, "SAVP")) {
secure_video = 1;
} else if (strcmp(protocol, "AVP")) {
@@ -8845,8 +8845,8 @@
ast_rtp_codecs_payloads_set_m_type(&newvideortp, NULL, codec);
}
/* Search for text media definition */
- } else if ((sscanf(m, "text %30u/%30u RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
- (sscanf(m, "text %30u RTP/AVP %n", &x, &len) == 1 && len > 0)) {
+ } else if ((sscanf(m, "text %30u/%30u RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0 && x) ||
+ (sscanf(m, "text %30u RTP/AVP %n", &x, &len) == 1 && len > 0 && x)) {
text = TRUE;
p->notext = FALSE;
p->offered_media[SDP_TEXT].offered = TRUE;
@@ -8867,8 +8867,8 @@
ast_rtp_codecs_payloads_set_m_type(&newtextrtp, NULL, codec);
}
/* Search for image media definition */
- } else if (p->udptl && ((sscanf(m, "image %30u udptl t38%n", &x, &len) == 1 && len > 0) ||
- (sscanf(m, "image %30u UDPTL t38%n", &x, &len) == 1 && len > 0) )) {
+ } else if (p->udptl && ((sscanf(m, "image %30u udptl t38%n", &x, &len) == 1 && len > 0 && x) ||
+ (sscanf(m, "image %30u UDPTL t38%n", &x, &len) == 1 && len > 0 && x) )) {
image = TRUE;
if (debug)
ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
More information about the asterisk-commits
mailing list