summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcutils/sched_policy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index aa4f39d..b302bef 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -138,6 +138,7 @@ static void __initialize(void) {
sprintf(proc_name, "/proc/%d/cmdline", ptid);
pfd = open(proc_name, O_RDONLY);
+ memset(proc_name, 0, sizeof(proc_name));
if (pfd > 0) {
read(pfd, proc_name, sizeof(proc_name) - 1);
close(pfd);