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:
Elliott Hughes 2016-04-19 22:23:33 +00:00 committed by android-build-merger
commit 2af9f2fe82
1 changed files with 1 additions and 1 deletions

View File

@ -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);