Skip to content

Commit c26dede

Browse files
committed
Added missing check for replay protection pointer before allocating new variable
1 parent 95fee2f commit c26dede

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/kvstore/securestore/source/SecureStore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ int SecureStore::set_start(set_handle_t *handle, const char *key, size_t final_d
290290
goto fail;
291291
}
292292

293-
if (create_flags & (REQUIRE_REPLAY_PROTECTION_FLAG | WRITE_ONCE_FLAG)) {
293+
if (_rbp_kv && (create_flags & (REQUIRE_REPLAY_PROTECTION_FLAG | WRITE_ONCE_FLAG))) {
294294
_ih->key = new char[strlen(key) + 1];
295295
strcpy(_ih->key, key);
296296
}

0 commit comments

Comments
 (0)