aboutsummaryrefslogtreecommitdiff
path: root/kernel/workqueue_internal.h
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2017-09-25 18:14:51 -0700
committerMister Oyster <oysterized@gmail.com>2017-12-08 17:34:06 +0100
commitfe19ee87cb697194c54cd28ba67d9e97fde64e2c (patch)
treec580ec19b3fd1d38e41abf3b7889158291135bda /kernel/workqueue_internal.h
parent62fb9f8b97d0cd3efa682fc7f53095f08b421708 (diff)
ANDROID: usb: gadget: f_mtp: Return error if count is negative
If the user passes in a negative file size in a int64, this will compare to be smaller than buffer length, and it will get truncated to form a read length that is larger than the buffer length. To fix, return -EINVAL if the count argument is negative, so the loop will never happen. Bug: 37429972 Test: Test with PoC Change-Id: I5d52e38e6fbe2c17eb8c493f9eb81df6cfd780a4 Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Diffstat (limited to 'kernel/workqueue_internal.h')
0 files changed, 0 insertions, 0 deletions