dataman: Prevent database corruption
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. https://github.com/PX4/Firmware/issues/7927
Loading
Please register or sign in to comment