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: I4caef9b5299259cc5f5ba6b930012385a7d8c09b
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
1 file changed