Merge "More secure and compiler warning fix for sprintf into snprintf"
am: 4f21555
* commit '4f2155518a6a8988c36cb59bcf3af6a17554db17':
More secure and compiler warning fix for sprintf into snprintf
Change-Id: Ifda61512ee281763a0bfbe8e918a4a2b346d2579
This commit is contained in:
commit
e05688a176
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];
|
char thread_name[255];
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
sprintf(statfile, "/proc/%d/stat", tid);
|
snprintf(statfile, sizeof(statfile), "/proc/%d/stat", tid);
|
||||||
memset(thread_name, 0, sizeof(thread_name));
|
memset(thread_name, 0, sizeof(thread_name));
|
||||||
|
|
||||||
fd = open(statfile, O_RDONLY);
|
fd = open(statfile, O_RDONLY);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue