mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15513 from mattgbio/check-rbp-SecureStore
SecureStore: Add missing check for rollback-protection pointer before allocating memorypull/15521/head
commit
e3d2c560e4
|
@ -290,7 +290,7 @@ int SecureStore::set_start(set_handle_t *handle, const char *key, size_t final_d
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (create_flags & (REQUIRE_REPLAY_PROTECTION_FLAG | WRITE_ONCE_FLAG)) {
|
||||
if (_rbp_kv && (create_flags & (REQUIRE_REPLAY_PROTECTION_FLAG | WRITE_ONCE_FLAG))) {
|
||||
_ih->key = new char[strlen(key) + 1];
|
||||
strcpy(_ih->key, key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue