diff --git a/CASA/micasadk/sscs_ndk.c b/CASA/micasadk/sscs_ndk.c index 6adca060..1e63e477 100644 --- a/CASA/micasadk/sscs_ndk.c +++ b/CASA/micasadk/sscs_ndk.c @@ -1803,7 +1803,7 @@ miCASAWriteBinaryKey keyChainID, &secretID, escapedSHSKey, - keyLen, + keyLen-1, // keys in micasad are not saved with null terminators val, *valLen, epPassword, @@ -2057,7 +2057,7 @@ miCASAReadBinaryKey keyChainID, &secretID, escapedSHSKey, - keyLen, + keyLen - 1, // keys in micasad are not saved with null terminators val, valLen, epPassword,