summaryrefslogtreecommitdiffstats
path: root/trusty
diff options
context:
space:
mode:
authorJocelyn Bohr2017-08-03 18:51:11 -0500
committerandroid-build-merger2017-08-03 18:51:11 -0500
commit18e3e2a66f2304203042237ce903b561f3b3b895 (patch)
treea3647f4e2b7970733c25bc165ba6c2e031049fbb /trusty
parent88636a05ad59f62de9278516205791c26c4a7d30 (diff)
parentefea269a751369d0c1f3106fa543db579c02f487 (diff)
downloadplatform-system-core-18e3e2a66f2304203042237ce903b561f3b3b895.tar.gz
platform-system-core-18e3e2a66f2304203042237ce903b561f3b3b895.tar.xz
platform-system-core-18e3e2a66f2304203042237ce903b561f3b3b895.zip
Merge "Return correct error code when finish input length is too long." am: 90657bbeab
am: efea269a75 Change-Id: Ida8d5c1742b6913b1f3b744c303e8abc3280b718
Diffstat (limited to 'trusty')
-rw-r--r--trusty/keymaster/trusty_keymaster_device.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/trusty/keymaster/trusty_keymaster_device.cpp b/trusty/keymaster/trusty_keymaster_device.cpp
index 5f16fd0c0..cfe94cc6c 100644
--- a/trusty/keymaster/trusty_keymaster_device.cpp
+++ b/trusty/keymaster/trusty_keymaster_device.cpp
@@ -576,7 +576,9 @@ keymaster_error_t TrustyKeymasterDevice::finish(keymaster_operation_handle_t ope
576 return error_; 576 return error_;
577 } 577 }
578 if (input && input->data_length > kMaximumFinishInputLength) { 578 if (input && input->data_length > kMaximumFinishInputLength) {
579 return KM_ERROR_INVALID_ARGUMENT; 579 ALOGE("%zu-byte input to finish; only %zu bytes allowed",
580 input->data_length, kMaximumFinishInputLength);
581 return KM_ERROR_INVALID_INPUT_LENGTH;
580 } 582 }
581 583
582 if (out_params) { 584 if (out_params) {