<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8358">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST-2018-003: Crash with an invalid SDP fmtp attribute<br><br>pjproject's fmtp retrieval function failed to catch invalid fmtp attributes.<br>Because of this Asterisk would crash if given an SDP with an invalid fmtp<br>attribute.<br><br>When retrieving the format this patch now makes sure the fmtp attribute is<br>available. If not available it now returns an error status.<br><br>ASTERISK-27583 #close<br><br>Change-Id: I5cebe000ce2d846cae3af33b6d72c416e51caf2f<br>---<br>A third-party/pjproject/patches/0071-sdp_fmtp_attr.patch<br>1 file changed, 34 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/58/8358/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/third-party/pjproject/patches/0071-sdp_fmtp_attr.patch b/third-party/pjproject/patches/0071-sdp_fmtp_attr.patch<br>new file mode 100644<br>index 0000000..8228d5d<br>--- /dev/null<br>+++ b/third-party/pjproject/patches/0071-sdp_fmtp_attr.patch<br>@@ -0,0 +1,34 @@<br>+diff --git a/pjmedia/src/pjmedia/sdp.c b/pjmedia/src/pjmedia/sdp.c<br>+index a3dd80b..6117e07 100644<br>+--- a/pjmedia/src/pjmedia/sdp.c<br>++++ b/pjmedia/src/pjmedia/sdp.c<br>+@@ -256,7 +256,8 @@ PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtpmap( const pjmedia_sdp_attr *attr,<br>+ <br>+ PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtpmap")==0, PJ_EINVALIDOP);<br>+ <br>+- PJ_ASSERT_RETURN(attr->value.slen != 0, PJMEDIA_SDP_EINATTR);<br>++ if (attr->value.slen == 0)<br>++ return PJMEDIA_SDP_EINATTR;<br>+ <br>+ init_sdp_parser();<br>+ <br>+@@ -341,6 +342,9 @@ PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_fmtp( const pjmedia_sdp_attr *attr,<br>+ <br>+ PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "fmtp")==0, PJ_EINVALIDOP);<br>+ <br>++ if (attr->value.slen == 0)<br>++ return PJMEDIA_SDP_EINATTR;<br>++<br>+ /* fmtp BNF:<br>+ * a=fmtp:<format> <format specific parameter><br>+ */<br>+@@ -379,6 +383,9 @@ PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtcp(const pjmedia_sdp_attr *attr,<br>+ <br>+ PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtcp")==0, PJ_EINVALIDOP);<br>+ <br>++ if (attr->value.slen == 0)<br>++ return PJMEDIA_SDP_EINATTR;<br>++<br>+ init_sdp_parser();<br>+ <br>+ /* fmtp BNF:<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8358">change 8358</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8358"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I5cebe000ce2d846cae3af33b6d72c416e51caf2f </div>
<div style="display:none"> Gerrit-Change-Number: 8358 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>