Commit Graph

3 Commits (master)

Author SHA1 Message Date
Matthias Goebel 5fc4abe57b Added missing check for replay protection pointer before allocating new variable
Problem: If a key with write-once flag is being set in a SecureStore without rollback-protection store (i.e. _rbp_kv == NULL), additional memory will be allocated for the variable _ih->key. The memory will not be deleted, though, as the delete in line 434 only happens if a rollback-protection store exists (i.e. _rbp_kv != NULL)

Solution: Only allocate the memory if _rbp_kv != NULL

Contribution is provided on behalf of BIOTRONIK.
2024-05-16 10:51:12 +02:00
Mingjie Shen 65b14f7181 Fix 'new[]' array freed with 'delete'
The array _scratch_buf is allocated using new[] in line 761 of
mbed-os/storage/kvstore/securestore/source/SecureStore.cpp.
But it was freed using delete.
2023-04-18 23:59:00 -04:00
Rajkumar Kanagaraj 72b4a14536 Refactor sub-directories - securestore, direct_access_devicekey, conf 2020-07-20 07:28:53 -07:00