summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.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:27:14 -0700
commitf7451e6782680cc1eb4fc1ea70806307800c3124 (patch)
tree67b8f7c97f07d6775ca38795b3bcc7e188414b0a /trusty/coverage/coverage_test.cpp
parentc3f71bc459ac164e8b6ca2123c2531897ab59355 (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_test.cpp')
0 files changed, 0 insertions, 0 deletions