summaryrefslogtreecommitdiff
path: root/gatekeeperd
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-07-10 13:54:22 -0700
committerAndres Morales <anmorales@google.com>2015-07-10 13:56:02 -0700
commit17aa7571f91aa99687ef94fdf0b66b7a847993bc (patch)
tree39affeae6407a9762113ce7e2c2c1c8009d36405 /gatekeeperd
parent6cd33beb8fda52110fe882a9c64ab10fe5b671c1 (diff)
[gatekeeperd] fix other unaligned mem access
Initially tested with the wrong (mnc) toolchain which just hid the error entirely. Now tested with master toolchain so this should be the last instance. Bug: 22367550 Change-Id: I0e785918b1a9f4a8af80dc96b794737fcfd12367
Diffstat (limited to 'gatekeeperd')
-rw-r--r--gatekeeperd/SoftGateKeeper.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gatekeeperd/SoftGateKeeper.h b/gatekeeperd/SoftGateKeeper.h
index bb25c81fc..c8010ca17 100644
--- a/gatekeeperd/SoftGateKeeper.h
+++ b/gatekeeperd/SoftGateKeeper.h
@@ -152,15 +152,15 @@ public:
}
bool DoVerify(const password_handle_t *expected_handle, const SizedBuffer &password) {
- FastHashMap::const_iterator it = fast_hash_map_.find(
- android::base::get_unaligned(&expected_handle->user_id));
+ uint64_t user_id = android::base::get_unaligned(&expected_handle->user_id);
+ FastHashMap::const_iterator it = fast_hash_map_.find(user_id);
if (it != fast_hash_map_.end() && VerifyFast(it->second, password)) {
return true;
} else {
if (GateKeeper::DoVerify(expected_handle, password)) {
uint64_t salt;
GetRandom(&salt, sizeof(salt));
- fast_hash_map_[expected_handle->user_id] = ComputeFastHash(password, salt);
+ fast_hash_map_[user_id] = ComputeFastHash(password, salt);
return true;
}
}