ehci-msm2: Add boundary check in echi driver
This change adds boundary check before copying data from userspace
buffer to ehci local buffer.
The third parameter passed to copy_from_user() should be minimum of the two
values between userpsace buffer size count and (local_buffer size - 1). The
last one byte in local_buffer should be reserved for null terminator.
CRs-Fixed: 547910
Change-Id: Id3c5432aa3fae3ce9759056b5481b9f516df7764
Signed-off-by:
Saket Saurabh <ssaurabh@codeaurora.org>
Loading
Please register or sign in to comment