summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-05-31 23:06:28 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-05-31 23:06:28 +0000
commit9e5220d6a2b93f3c8c8c38afbfb63b1708e04505 (patch)
treef5b7824c352a272b701a6373e31c1d62b09aaead
parent44c75910d158bc570fd95605eedec1cbf5ebacfa (diff)
parent9760d1a21d405d944fc093f434d093023832b367 (diff)
downloadextras-9e5220d6a2b93f3c8c8c38afbfb63b1708e04505.tar.gz
Snap for 6546046 from 9760d1a21d405d944fc093f434d093023832b367 to rvc-release
Change-Id: I2d5c65ba6b7c8c34d8606a3584d7936251e4973d
-rw-r--r--libfec/avb_utils.cpp4
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,