Skip to content

Commit

Permalink
Merge pull request #15513 from mattgbio/check-rbp-SecureStore
Browse files Browse the repository at this point in the history
SecureStore: Add missing check for rollback-protection pointer before allocating memory
  • Loading branch information
0xc0170 authored Jun 8, 2024
2 parents 5cb118b + 5fc4abe commit e3d2c56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/kvstore/securestore/source/SecureStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e3d2c56

Please sign in to comment.