Merge "[VTS 2.3] Add length check before reading blob" into udc-dev am: a9d135cd14
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23438943 Change-Id: I492cd7aa3aec59dc6af2385de5d3af6b9b1a887b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
b6ffd5c35d
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ class ComposerCommandEngine : public V2_2::hal::ComposerCommandEngine {
|
|||
|
||||
std::vector<IComposerClient::PerFrameMetadataBlob> metadata;
|
||||
|
||||
for (size_t i = 0; i < numBlobs; i++) {
|
||||
for (size_t i = 0; i < numBlobs && length >= 2; i++) {
|
||||
IComposerClient::PerFrameMetadataKey key =
|
||||
static_cast<IComposerClient::PerFrameMetadataKey>(readSigned());
|
||||
uint32_t blobSize = read();
|
||||
|
|
Loading…
Reference in a new issue