summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2017-09-27 11:49:44 -0700
committerGreg Hackmann <ghackmann@google.com>2018-10-18 19:43:15 +0000
commit34e65b671bc7bd047847dd7e67392dc55585d5cf (patch)
tree6b6d39737047368c92aa866ff867ec25b37dfb8d /tools/perf/scripts/python
parent7a95540418bec4adafff304587715ffbc37d3fd9 (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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions