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

Commit 98a2d2f5 authored by Sravankumar bijili's avatar Sravankumar bijili
Browse files

msm: kgsl: Fix out of bound access in the simple_read_from_buffer()



If strlen() is used to find the size of buffer, there is a possibility
that size can go up to INT_MAX, if buffer is not NULL terminated.
To avoid this, pass size directly to simple_read_from_buffer().

Change-Id: Id3e3fc53279e9be20b2a5cddea0a5560f776be62
Signed-off-by: default avatarSravankumar bijili <csbijil@codeaurora.org>
parent 8ca6d749
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -541,7 +541,7 @@ static ssize_t profile_assignments_read(struct file *filep,
	}

	size = simple_read_from_buffer(ubuf, max, ppos, buf,
			strlen(buf));
			pos - buf);

	kfree(buf);