Skip to content

Conversation

@nattgris
Copy link

@nattgris nattgris commented Dec 3, 2020

If the current OD had an object with a larger data size than when the
objects were stored, only the smaller part of the uint64_t would be read
into, but the actual setting of the object would use the entire, partly
uninitialized, value.

Also, in the pointer case the size was not checked against the actual size
of the target object, which would cause memory corruption if the object had
been shrunk since the values were stored.

hefloryd and others added 2 commits December 30, 2020 16:52
Test load behaviour when OD entries change in size.
If the current OD had an object with a larger data size than when the
objects were stored, only the smaller part of the uint64_t would be read
into, but the actual setting of the object would use the entire, partly
uninitialized, value.

Also, in the pointer case the size was not checked against the actual size
of the target object, which would cause memory corruption if the object had
been shrunk since the values were stored.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@unjo.com>
Change-Id: I1e0fc0b0d6da4594ca8bcb61e01ab6ab5f42a551
@hefloryd hefloryd merged commit 3adaee4 into rtlabs-com:master Dec 30, 2020
@nattgris nattgris deleted the od_load branch December 30, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants