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 /pjlib/src/pj/os_core_win32.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 'pjlib/src/pj/os_core_win32.c')
-rw-r--r-- | pjlib/src/pj/os_core_win32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 726702b2..565efb3c 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -228,9 +228,11 @@ PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name, #endif if (cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1) - pj_ansi_sprintf(thread->obj_name, cstr_thread_name, thread->idthread); + pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), + cstr_thread_name, thread->idthread); else - pj_ansi_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); + pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), + "thr%p", (void*)thread->idthread); rc = pj_thread_local_set(thread_tls_id, thread); if (rc != PJ_SUCCESS) |