Merge pull request 'bugfix for local pool' (#754) from local-pool-bugfix into development
fsfw/fsfw/pipeline/head This commit looks good
Details
fsfw/fsfw/pipeline/head This commit looks good
Details
Reviewed-on: #754
This commit is contained in:
commit
d91e1ecc0a
|
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/745
|
||||
- Small tweak for version getter
|
||||
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/744
|
||||
- Important bugfix for `LocalPool::delete` function, where an overflow could possibly lead to UB.
|
||||
|
||||
## Added
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ ReturnValue_t LocalPool::deleteData(store_address_t storeId) {
|
|||
ReturnValue_t status = returnvalue::OK;
|
||||
size_type pageSize = getSubpoolElementSize(storeId.poolIndex);
|
||||
if ((pageSize != 0) and (storeId.packetIndex < numberOfElements[storeId.poolIndex])) {
|
||||
uint16_t packetPosition = getRawPosition(storeId);
|
||||
size_type packetPosition = getRawPosition(storeId);
|
||||
uint8_t* ptr = &store[storeId.poolIndex][packetPosition];
|
||||
std::memset(ptr, 0, pageSize);
|
||||
// Set free list
|
||||
|
|
Loading…
Reference in New Issue