Changeset 4320


Ignore:
Timestamp:
Jan 17, 2013 9:16:10 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1609: Garbage character may be printed after the URI parameter in Authorization/Proxy?-Authorization header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c

    r3999 r4320  
    924924        int len; 
    925925 
    926         uri_str = (char*)pj_pool_alloc(tdata->pool, PJSIP_MAX_URL_SIZE); 
     926        uri_str = (char*)pj_pool_alloc(tdata->pool, PJSIP_MAX_URL_SIZE+1); 
    927927        len = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, tdata->msg->line.req.uri, 
    928928                              uri_str, PJSIP_MAX_URL_SIZE); 
    929929        if (len < 1 || len >= PJSIP_MAX_URL_SIZE) 
    930930            return PJSIP_EURITOOLONG; 
     931 
     932        /* https://trac.pjsip.org/repos/ticket/1609 */ 
     933        uri_str[len] = '\0'; 
    931934 
    932935        for (i=0; i<sess->cred_cnt; ++i) { 
Note: See TracChangeset for help on using the changeset viewer.