diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-01 07:08:58 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-01 07:08:58 +0000 |
commit | ec496a8ff9c3d518bfbf7df88f0a3ef44cd67273 (patch) | |
tree | f5b7824c352a272b701a6373e31c1d62b09aaead | |
parent | 3b99b6a894980ce9f831f0992af4349faac2708d (diff) | |
parent | 9ba50f95990233a0b43c7bd776c4b72906731e83 (diff) | |
download | extras-ec496a8ff9c3d518bfbf7df88f0a3ef44cd67273.tar.gz |
Snap for 6546508 from 9ba50f95990233a0b43c7bd776c4b72906731e83 to mainline-release
Change-Id: Ie64437a8bb78a9163e97eb840d39ec8d6a4903c8
-rw-r--r-- | libfec/avb_utils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libfec/avb_utils.cpp b/libfec/avb_utils.cpp index 8913f2a1..849556ef 100644 --- a/libfec/avb_utils.cpp +++ b/libfec/avb_utils.cpp @@ -82,6 +82,10 @@ int parse_avb_image(fec_handle *f, const std::vector<uint8_t> &vbmeta) { const AvbHashtreeDescriptor *hashtree_descriptor_ptr = nullptr; avb_descriptor_foreach(vbmeta.data(), vbmeta.size(), parse_descriptor, &hashtree_descriptor_ptr); + if (!hashtree_descriptor_ptr) { + error("failed to find avb hashtree descriptor"); + return -1; + } AvbHashtreeDescriptor hashtree_descriptor; if (!avb_hashtree_descriptor_validate_and_byteswap(hashtree_descriptor_ptr, |