Changeset 5740 for pjproject


Ignore:
Timestamp:
Feb 21, 2018 2:28:02 AM (7 years ago)
Author:
ming
Message:

Fixed #2092: Crash when receiving SDP with invalid fmtp attribute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/sdp.c

    r5697 r5740  
    257257    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtpmap")==0, PJ_EINVALIDOP); 
    258258 
    259     PJ_ASSERT_RETURN(attr->value.slen != 0, PJMEDIA_SDP_EINATTR); 
     259    if (attr->value.slen == 0) 
     260        return PJMEDIA_SDP_EINATTR; 
    260261 
    261262    init_sdp_parser(); 
     
    345346    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "fmtp")==0, PJ_EINVALIDOP); 
    346347 
     348    if (attr->value.slen == 0) 
     349        return PJMEDIA_SDP_EINATTR; 
     350 
    347351    /* fmtp BNF: 
    348352     *  a=fmtp:<format> <format specific parameter> 
     
    382386 
    383387    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtcp")==0, PJ_EINVALIDOP); 
     388 
     389    if (attr->value.slen == 0) 
     390        return PJMEDIA_SDP_EINATTR; 
    384391 
    385392    init_sdp_parser(); 
Note: See TracChangeset for help on using the changeset viewer.