Merge "libcutils: change klog_level to KLOG_INFO_LEVEL" am: 5e9863bf63 am: 974dd6291e
am: c87d4ce758
Change-Id: I89a9aac59e09895b725a9d6e02c649d030746aa7
diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp
index d4a92e5..96bda07 100644
--- a/gatekeeperd/gatekeeperd.cpp
+++ b/gatekeeperd/gatekeeperd.cpp
@@ -166,7 +166,14 @@
enrolled_password_handle, enrolled_password_handle_length);
}
- if (ret == 0) {
+ if (ret == GATEKEEPER_RESPONSE_OK && (*enrolled_password_handle == nullptr ||
+ *enrolled_password_handle_length != sizeof(password_handle_t))) {
+ ret = GATEKEEPER_RESPONSE_ERROR;
+ ALOGE("HAL: password_handle=%p size_of_handle=%" PRIu32 "\n",
+ *enrolled_password_handle, *enrolled_password_handle_length);
+ }
+
+ if (ret == GATEKEEPER_RESPONSE_OK) {
gatekeeper::password_handle_t *handle =
reinterpret_cast<gatekeeper::password_handle_t *>(*enrolled_password_handle);
store_sid(uid, handle->user_id);