Ignore:
Timestamp:
Oct 8, 2013 9:08:13 AM (11 years ago)
Author:
bennylp
Message:

Re #1703: fixing general bugs. First installment: correct handling of snprintf return value

File:
1 edited

Legend:

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

    r4537 r4613  
    504504                           rtpmap->param.ptr); 
    505505 
    506     if (len < 1 || len > (int)sizeof(tempbuf)) 
     506    if (len < 1 || len >= (int)sizeof(tempbuf)) 
    507507        return PJMEDIA_SDP_ERTPMAPTOOLONG; 
    508508 
     
    527527                               (int)c->addr.slen, 
    528528                               c->addr.ptr); 
    529     if (printed < 1 || printed > len) 
     529    if (printed < 1 || printed >= len) 
    530530        return -1; 
    531531 
Note: See TracChangeset for help on using the changeset viewer.