Changeset 5192


Ignore:
Timestamp:
Oct 29, 2015 1:27:02 AM (9 years ago)
Author:
ming
Message:

Re #1882 (misc): Fixed inaccurate index checking assertion when removing SDP attributes in pjmedia_sdp_attr_remove() and pjmedia_sdp_attr_remove_all()

Thanks to Fredrik Hansson for the report.

File:
1 edited

Legend:

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

    r5190 r5192  
    202202 
    203203    PJ_ASSERT_RETURN(count && attr_array && name, PJ_EINVAL); 
    204     PJ_ASSERT_RETURN(*count < PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY); 
     204    PJ_ASSERT_RETURN(*count <= PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY); 
    205205 
    206206    attr_name.ptr = (char*)name; 
     
    229229 
    230230    PJ_ASSERT_RETURN(count && attr_array && attr, PJ_EINVAL); 
    231     PJ_ASSERT_RETURN(*count < PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY); 
     231    PJ_ASSERT_RETURN(*count <= PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY); 
    232232 
    233233    for (i=0; i<*count; ) { 
Note: See TracChangeset for help on using the changeset viewer.