Changeset 5741


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

Fixed #2093: Crash when parsing SDP with an invalid media format description

File:
1 edited

Legend:

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

    r5740 r5741  
    15301530             */ 
    15311531            if (pj_isdigit(*m->desc.fmt[j].ptr)) { 
    1532                 unsigned pt = pj_strtoul(&m->desc.fmt[j]); 
     1532                unsigned long pt; 
     1533                pj_status_t status = pj_strtoul3(&m->desc.fmt[j], &pt, 10); 
    15331534 
    15341535                /* Payload type is between 0 and 127.  
    15351536                 */ 
    1536                 CHECK( pt <= 127, PJMEDIA_SDP_EINPT); 
     1537                CHECK( status == PJ_SUCCESS && pt <= 127, PJMEDIA_SDP_EINPT); 
    15371538 
    15381539                /* If port is not zero, then for each dynamic payload type, an 
Note: See TracChangeset for help on using the changeset viewer.