hsic_sysmon_test: Add check for userspace buffer size count

hsic_sysmon_test local buffer size limit is 4096 bytes. If user space
tries to write data with size greater than 4096 bytes, memory corruption
would happen. Hence, add check for userspace buffer size count before
writing data from userspace buffer to hsic_sysmon_test local buffer.

CRs-Fixed: 547489
Change-Id: I29b286451395bef68a879baa0366dcef56d489c4
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
1 file changed