Changeset 5753


Ignore:
Timestamp:
Mar 8, 2018 11:54:40 PM (7 years ago)
Author:
ming
Message:

Re #2098: Fixed insufficient buffer length to avoid message truncation.

File:
1 edited

Legend:

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

    r5748 r5753  
    549549    attr->name = pj_str("ssrc"); 
    550550    attr->value.ptr = (char*) pj_pool_alloc(pool, cname->slen+7 /* " cname:"*/ 
    551                                                   + 10 /* 32-bit integer */); 
    552     attr->value.slen = pj_ansi_snprintf(attr->value.ptr, cname->slen+17, 
     551                                                  + 10 /* 32-bit integer */ 
     552                                                  + 1 /* NULL */); 
     553    attr->value.slen = pj_ansi_snprintf(attr->value.ptr, cname->slen+18, 
    553554                                        "%d cname:%.*s", ssrc, 
    554555                                        (int)cname->slen, cname->ptr); 
Note: See TracChangeset for help on using the changeset viewer.