summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorMayank Rana <mrana@quicinc.com>2020-09-11 11:40:00 -0700
committerJosh Gao <jmgao@google.com>2020-09-18 12:28:16 -0700
commit1412c5798be587b7bff2296f7627e157926925fd (patch)
tree8018cf1be7d58b12e445b21d9d12a071662ca4f0 /trusty/coverage/coverage.cpp
parentd26f8c98aa84016df1b8a482cd99cacd6e6380db (diff)
adbd: Fix check against valid payload size
block->payload and its size are not valid when it is used to check against bytes_left due to std::move() performed on its just prior to the check. Hence check will always fail to detect the case where received data is more than expected. To detect this condition and allow error handling with std::move(), remove extra payload variable and directly use block->payload. Bug: http://b/168917244 Change-Id: I992bbba9d9a9861a195834f69d62e69b90658210 (cherry picked from commit 71a33cfa678ddc7704693b45244f3190af1da65d)
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions