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:
Raja M 2016-04-19 22:19:57 +00:00 committed by android-build-merger
commit e05688a176

View file

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