diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-07-29 20:29:24 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-07-29 20:29:24 +0000 |
commit | 8437d671f9c4c0fdd2d5d29f8741173391196e1c (patch) | |
tree | d3be6f832e41d7f49fabd8cd91996ddd1b392418 /pjsip/src/pjsua-lib/pjsua_acc.c | |
parent | dfc70260daca970cc1df362f26fd669d75812eb0 (diff) |
Another take at fixing 64bit problems. PJ_MAX_OBJ_NAME is increased to 32 chars (from 16), and check all those sprintf's especially the ones with "%p" format.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@635 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_acc.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 1d5873be..05815ede 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -289,7 +289,7 @@ PJ_DEF(pj_status_t) pjsua_acc_add_local( pjsua_transport_id tid, { pjsua_acc_config cfg; struct transport_data *t = &pjsua_var.tpdata[tid]; - char uri[62]; + char uri[PJSIP_MAX_URL_SIZE]; /* ID must be valid */ PJ_ASSERT_RETURN(tid>=0 && tid<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL); @@ -300,11 +300,12 @@ PJ_DEF(pj_status_t) pjsua_acc_add_local( pjsua_transport_id tid, pjsua_acc_config_default(&cfg); /* Build URI for the account */ - pj_ansi_sprintf(uri, "<sip:%.*s:%d;transport=%s>", - (int)t->local_name.host.slen, - t->local_name.host.ptr, - t->local_name.port, - pjsip_transport_get_type_name(t->type)); + pj_ansi_snprintf(uri, PJSIP_MAX_URL_SIZE, + "<sip:%.*s:%d;transport=%s>", + (int)t->local_name.host.slen, + t->local_name.host.ptr, + t->local_name.port, + pjsip_transport_get_type_name(t->type)); cfg.id = pj_str(uri); |