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
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index 6bba3a7..7bb8223 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -306,7 +306,7 @@
     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);