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

Commit 48ffe555 authored by Praveen Kurapati's avatar Praveen Kurapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: fix to buffer overflow issue



In ipa3_read_msg array index out of bounds access
occurring leads to buffer-overflow error. Modified
code to overcome the issue.

Change-Id: Id1b5e67605c4d0dfc25d6ca860a4efc32fd64790
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent f5f31790
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1556,7 +1556,7 @@ static ssize_t ipa3_read_msg(struct file *file, char __user *ubuf,
	int cnt = 0;
	int i;

	for (i = 0; i < IPA_EVENT_MAX_NUM; i++) {
	for (i = 0; i < ARRAY_SIZE(ipa3_event_name); i++) {
		nbytes = scnprintf(dbg_buff + cnt, IPA_MAX_MSG_LEN - cnt,
				"msg[%u:%27s] W:%u R:%u\n", i,
				ipa3_event_name[i],