Ignore:
Timestamp:
Jul 29, 2006 8:29:24 PM (18 years ago)
Author:
bennylp
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_core_unix.c

    r582 r635  
    211211 
    212212    if(cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1) 
    213         pj_ansi_sprintf(thread->obj_name, cstr_thread_name, thread->thread); 
     213        pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name),  
     214                         cstr_thread_name, thread->thread); 
    214215    else 
    215         pj_ansi_sprintf(thread->obj_name, "thr%p", (void*)thread->thread); 
     216        pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name),  
     217                         "thr%p", (void*)thread->thread); 
    216218     
    217219    rc = pj_thread_local_set(thread_tls_id, thread); 
Note: See TracChangeset for help on using the changeset viewer.