summaryrefslogtreecommitdiff
path: root/aosp/apex_handler_interface.h
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2021-03-08 16:10:25 -0500
committerTreehugger Robot <treehugger-gerrit@google.com>2021-03-16 22:56:12 +0000
commitebd115e8bd045dfd05889e3574d5a02e7b53b2be (patch)
treedc7bb569d81005c0c12b1903daf78b2ea73221a3 /aosp/apex_handler_interface.h
parent0c37f621642817314cd40b3aaa444137114af198 (diff)
Pass in source slot to ctor of dynamic control
When DynamicPartitionControlAndroid is constructed, it initializes both source and target slot to -1. These values get updated during PreparePartitionsForUpdate call. And we only PreparePartitionsForUpdate() when applying an OTA or applocating space for an OTA(not when verifying OTA metadata). Which means if VerifyPayloadApplicable() is called before any call two other APIs, we could be using an "Uninitialiazed" dynamic partition control. To mitigate this problem, we pass in source_slot at ctor of DynamicPartitionControl, also make IsDynamicPartition() api take in a slot number to avoid reading uninitialized member fields. Bug: 181643302 Test: apply an OTA, abort, restart update_engine, verify a payload Change-Id: I9a8a0fe8a9aca48e91241e15bdec33a1c1228553
Diffstat (limited to 'aosp/apex_handler_interface.h')
0 files changed, 0 insertions, 0 deletions