Bug 1372383 - Improve SDP parsing. r=bwc
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Mon, 12 Jun 2017 19:36:58 -0700
changeset 419030 c4788415e46117f43700b7fc64cad9971542985e
parent 419029 3f821df0f23c3063ee25f1f828051ec8da1f6b41
child 419031 66a54d08470ecb0a8d1633d96b2ed87a6034c411
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc
bugs1372383
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1372383 - Improve SDP parsing. r=bwc MozReview-Commit-ID: EJOvtMjQsav
media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
@@ -1184,16 +1184,19 @@ sdp_result_e sdp_parse_attr_fmtp (sdp_t 
                     if (iter == 1)
                         fmtp_p->annex_p_val_picture_resize = (uint16_t) strtoul_result;
                     else if (iter == 2)
                         fmtp_p->annex_p_val_warp = (uint16_t) strtoul_result;
 
                     temp = PL_strtok_r(NULL, ",", &strtok_state);
                     iter++;
                 }
+            } else {
+              SDP_FREE(temp_ptr);
+              return SDP_INVALID_PARAMETER;
             }
 
             fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
             codec_info_found = TRUE;
 
         } else if (cpr_strncasecmp(tmp,sdp_fmtp_codec_param[42].name,
                                sdp_fmtp_codec_param[42].strlen) == 0) {
             result1 = sdp_get_fmtp_tok_val(sdp_p, &fmtp_ptr, "level_asymmetry_allowed", tmp, sizeof(tmp),