summaryrefslogtreecommitdiffstats
path: root/trusty
diff options
context:
space:
mode:
authorJocelyn Bohr2017-08-03 15:59:10 -0500
committerJocelyn Bohr2017-08-03 15:59:10 -0500
commitf1e5edf7656d5f1f577fa93a5878274b14aa0e84 (patch)
tree267813502e138a06203435be88f6c57e1f660b2f /trusty
parentceb7814c8650c9dd1031ad6085d2ddb80914b6a9 (diff)
downloadplatform-system-core-f1e5edf7656d5f1f577fa93a5878274b14aa0e84.tar.gz
platform-system-core-f1e5edf7656d5f1f577fa93a5878274b14aa0e84.tar.xz
platform-system-core-f1e5edf7656d5f1f577fa93a5878274b14aa0e84.zip
Return correct error code when finish input length is too long.
Bug: 63745895 Change-Id: I465bf9138a0a21363f89f2c6074f7108ee33af70
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) {