Merge "More secure and compiler warning fix for sprintf into snprintf"
This commit is contained in:
commit
4f2155518a
1 changed files with 1 additions and 1 deletions
|
|
@ -306,7 +306,7 @@ int set_sched_policy(int tid, SchedPolicy policy)
|
|||
char thread_name[255];
|
||||
int fd;
|
||||
|
||||
sprintf(statfile, "/proc/%d/stat", tid);
|
||||
snprintf(statfile, sizeof(statfile), "/proc/%d/stat", tid);
|
||||
memset(thread_name, 0, sizeof(thread_name));
|
||||
|
||||
fd = open(statfile, O_RDONLY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue