Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 856452b4 authored by Dmitry Shmidt's avatar Dmitry Shmidt Committed by Todd Kjos
Browse files

ANDROID: uid_sys_stats: Copy task_struct comm field to bigger buffer



get_task_comm() currently checks if buf_size != TASK_COMM_LEN
and fails even if sizeof(buf) > TASK_COMM_LEN.

Change-Id: Icb3e9c172607534ef1db10baf5d626083db73498
Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
parent 47b77b8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ static void get_full_task_comm(struct task_entry *task_entry,
	struct mm_struct *mm = task->mm;

	/* fill the first TASK_COMM_LEN bytes with thread name */
	get_task_comm(task_entry->comm, task);
	__get_task_comm(task_entry->comm, TASK_COMM_LEN, task);
	i = strlen(task_entry->comm);
	while (i < TASK_COMM_LEN)
		task_entry->comm[i++] = ' ';