Changeset 4322
- Timestamp:
- Jan 17, 2013 10:09:09 AM (12 years ago)
- Location:
- pjproject/trunk/pjsip/src/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c
r4320 r4322 921 921 */ 922 922 unsigned i; 923 char *uri_str;924 int len; 925 926 uri _str = (char*)pj_pool_alloc(tdata->pool, PJSIP_MAX_URL_SIZE+1);927 len = pjsip_uri_print(PJSIP_URI_IN_REQ_URI,tdata->msg->line.req.uri,928 uri_str, PJSIP_MAX_URL_SIZE);929 if ( len < 1 ||len >= PJSIP_MAX_URL_SIZE)923 pj_str_t uri; 924 925 uri.ptr = (char*)pj_pool_alloc(tdata->pool, PJSIP_MAX_URL_SIZE); 926 uri.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, 927 tdata->msg->line.req.uri, 928 uri.ptr, PJSIP_MAX_URL_SIZE); 929 if (uri.slen < 1 || uri.slen >= PJSIP_MAX_URL_SIZE) 930 930 return PJSIP_EURITOOLONG; 931 932 /* https://trac.pjsip.org/repos/ticket/1609 */933 uri_str[len] = '\0';934 931 935 932 for (i=0; i<sess->cred_cnt; ++i) { … … 950 947 pj_strdup(tdata->pool, &hs->credential.digest.realm, 951 948 &c->realm); 952 pj_strdup2(tdata->pool, &hs->credential.digest.uri, 953 uri_str); 949 pj_strdup(tdata->pool, &hs->credential.digest.uri, &uri); 954 950 pj_strdup(tdata->pool, &hs->credential.digest.algorithm, 955 951 &sess->pref.algorithm); -
pjproject/trunk/pjsip/src/pjsip/sip_tel_uri.c
r3553 r4322 183 183 int printed; 184 184 char *startbuf = buf; 185 char *endbuf = buf+size ;185 char *endbuf = buf+size-1; 186 186 const pjsip_parser_const_t *pc = pjsip_parser_const(); 187 187 … … 217 217 return -1; 218 218 buf += printed; 219 220 *buf = '\0'; 219 221 220 222 return (buf-startbuf);
Note: See TracChangeset
for help on using the changeset viewer.