Changeset 635 for pjproject/trunk/pjlib/src/pj/os_core_linux_kernel.c
- Timestamp:
- Jul 29, 2006 8:29:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/os_core_linux_kernel.c
r582 r635 139 139 thread->terminate = 0; 140 140 141 /* set name of this process (max 15 chars + 0 !) */ 142 thread->obj_name[15] = '\0'; 141 /* set name of this process (making sure obj_name is null 142 * terminated first) 143 */ 144 thread->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 143 145 sprintf(current->comm, thread->obj_name); 144 146 … … 267 269 pj_sprintf(thread->obj_name, cstr_thread_name, thread->thread); 268 270 else 269 pj_sprintf(thread->obj_name, "thr%p", (void*)thread->thread); 271 pj_snprintf(thread->obj_name, sizeof(thread->obj_name), 272 "thr%p", (void*)thread->thread); 270 273 271 274 /* Initialize. */
Note: See TracChangeset
for help on using the changeset viewer.