Merge "More secure and compiler warning fix for sprintf into snprintf" am: 4f21555
am: e05688a
* commit 'e05688a176c27025d59c0a512501a411b56f1bb1':
More secure and compiler warning fix for sprintf into snprintf
Change-Id: I93d4ff6d1c2674113d481ff06170d19f31951346
This commit is contained in:
commit
2af9f2fe82
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,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…
Reference in a new issue