}
/* Set values for new slot. */
cprof_slot = &cprof_tbl[control.slots_used++];
- strcpy(cprof_slot->cpath, cpath);
+ strlcpy(cprof_slot->cpath, cpath, sizeof(cprof_slot->cpath));
cprof_slot->calls = 1;
/* Update index. */
assert(_ENDPOINT_P(scheduler_e) >= 0);
assert(_ENDPOINT_P(schedulee_e) >= 0);
assert(_ENDPOINT_P(parent_e) >= 0);
- assert(maxprio >= 0);
assert(maxprio < NR_SCHED_QUEUES);
assert(newscheduler_e);
&priv_flags);
if ( r != OK) {
sef_self_endpoint = SELF;
- sprintf(sef_self_name, "%s", "Unknown");
+ strlcpy(sef_self_name, "Unknown", sizeof(sef_self_name));
}
sef_self_priv_flags = priv_flags;
old_endpoint = NONE;
{
/* Build and return a SEF debug header. */
sef_debug_refresh_params();
- sprintf(sef_debug_header_buff, "%s: time = %ds %06dus",
- sef_self_name, (int) sef_debug_time_sec, (int) sef_debug_time_us);
+ snprintf(sef_debug_header_buff, sizeof(sef_debug_header_buff),
+ "%s: time = %ds %06dus", sef_self_name, (int) sef_debug_time_sec,
+ (int) sef_debug_time_us);
return sef_debug_header_buff;
}