Merge pull request #411 from signalwire/sdp_crash

[Core] Fix crash when parsing some uncommon SDP attributes
This commit is contained in:
Andrey Volk 2020-02-25 02:00:01 +04:00 committed by GitHub
commit cf0e81c758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5977,7 +5977,9 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
}
}
t_engine->cur_payload_map = red_pmap;
if (red_pmap) {
t_engine->cur_payload_map = red_pmap;
}
for (attr = m->m_attributes; attr; attr = attr->a_next) {
if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value) {