Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataman: Prevent database corruption #8137

Merged
merged 1 commit into from Oct 16, 2017

Conversation

zehortigoza
Copy link
Contributor

The size in g_per_item_size[item] is the real struct size

  • DM_SECTOR_HDR_SIZE bytes of header and the backend functions were
    not taking in care it. So a call to dm_write() with more bytes than
    the real struct is allowed, causing corruption in the header of the
    next item.

Kudos to jeonghwan-lee for finding it. #7927

The size in g_per_item_size[item] is the real struct size
+ DM_SECTOR_HDR_SIZE bytes of header and the backend functions were
not taking in care it. So a call to dm_write() with more bytes than
the real struct is allowed, causing corruption in the header of the
next item.

Kudos to jeonghwan-lee for finding it. PX4#7927
@LorenzMeier
Copy link
Member

Thanks!

@LorenzMeier LorenzMeier merged commit 239de71 into PX4:master Oct 16, 2017
@jeonghwan-lee
Copy link

Thanks zehortigoza and LorenzMeier

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.

None yet

3 participants