diff options
Diffstat (limited to 'keystore/keystore.cpp')
-rw-r--r-- | keystore/keystore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp index a956533..c1ce584 100644 --- a/keystore/keystore.cpp +++ b/keystore/keystore.cpp @@ -487,12 +487,12 @@ class Blob { public: Blob(const uint8_t* value, size_t valueLength, const uint8_t* info, uint8_t infoLength, BlobType type) { - if (valueLength > sizeof(mBlob.value)) { - valueLength = sizeof(mBlob.value); + if (valueLength > VALUE_SIZE) { + valueLength = VALUE_SIZE; ALOGW("Provided blob length too large"); } - if (infoLength + valueLength > sizeof(mBlob.value)) { - infoLength = sizeof(mBlob.value) - valueLength; + if (infoLength + valueLength > VALUE_SIZE) { + infoLength = VALUE_SIZE - valueLength; ALOGW("Provided info length too large"); } mBlob.length = valueLength; |