summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-29 20:29:24 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-29 20:29:24 +0000
commit8437d671f9c4c0fdd2d5d29f8741173391196e1c (patch)
treed3be6f832e41d7f49fabd8cd91996ddd1b392418 /pjmedia
parentdfc70260daca970cc1df362f26fd669d75812eb0 (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 'pjmedia')
-rw-r--r--pjmedia/src/pjmedia/conference.c4
-rw-r--r--pjmedia/src/pjmedia/endpoint.c2
-rw-r--r--pjmedia/src/pjmedia/stream.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c
index cd465dc6..b888573d 100644
--- a/pjmedia/src/pjmedia/conference.c
+++ b/pjmedia/src/pjmedia/conference.c
@@ -698,8 +698,8 @@ PJ_DEF(pj_status_t) pjmedia_conf_add_passive_port( pjmedia_conf *conf,
if (name == NULL) {
name = &tmp;
- tmp.ptr = pj_pool_alloc(pool, 20);
- tmp.slen = pj_ansi_sprintf(tmp.ptr, "ConfPort#%d", index);
+ tmp.ptr = pj_pool_alloc(pool, 32);
+ tmp.slen = pj_ansi_snprintf(tmp.ptr, 32, "ConfPort#%d", index);
}
/* Create and initialize the media port structure. */
diff --git a/pjmedia/src/pjmedia/endpoint.c b/pjmedia/src/pjmedia/endpoint.c
index cd1977c6..5e098c45 100644
--- a/pjmedia/src/pjmedia/endpoint.c
+++ b/pjmedia/src/pjmedia/endpoint.c
@@ -470,7 +470,7 @@ PJ_DEF(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt)
for (i=0; i<count; ++i) {
const char *type;
pjmedia_codec_param param;
- char bps[16];
+ char bps[32];
switch (codec_info[i].type) {
case PJMEDIA_TYPE_AUDIO:
diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
index fc0b7cb4..064fd1f9 100644
--- a/pjmedia/src/pjmedia/stream.c
+++ b/pjmedia/src/pjmedia/stream.c
@@ -912,6 +912,7 @@ PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt,
pjmedia_stream **p_stream)
{
+ enum { M = 32 };
pjmedia_stream *stream;
pj_str_t name;
unsigned jb_init, jb_max, jb_min_pre, jb_max_pre;
@@ -926,8 +927,8 @@ PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt,
PJ_ASSERT_RETURN(stream != NULL, PJ_ENOMEM);
/* Init stream/port name */
- name.ptr = pj_pool_alloc(pool, 24);
- name.slen = pj_ansi_snprintf(name.ptr, 24, "strm%p", stream);
+ name.ptr = pj_pool_alloc(pool, M);
+ name.slen = pj_ansi_snprintf(name.ptr, M, "strm%p", stream);
/* Init some port-info. Some parts of the info will be set later