summaryrefslogtreecommitdiffstats
path: root/trusty
diff options
context:
space:
mode:
authorTreehugger Robot2017-08-03 18:35:05 -0500
committerGerrit Code Review2017-08-03 18:35:05 -0500
commit90657bbeab7de59b350a303f477e3cde1dc8669a (patch)
treeeb94050cf678f08dab2052d57d7440512c102cc1 /trusty
parent172b1d000844536bb4b268c2450211c97031d49d (diff)
parentf1e5edf7656d5f1f577fa93a5878274b14aa0e84 (diff)
downloadplatform-system-core-90657bbeab7de59b350a303f477e3cde1dc8669a.tar.gz
platform-system-core-90657bbeab7de59b350a303f477e3cde1dc8669a.tar.xz
platform-system-core-90657bbeab7de59b350a303f477e3cde1dc8669a.zip
Merge "Return correct error code when finish input length is too long."
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) {