Commit c8ab060
authored
Fix: Packed attribute missing for FF_Part_t causing buggy memcpy and alignment issues (#77)
Fix: Packed attribute missing for FF_Part_t causing buggy memcpy and
alignment issues
Description
-----------
The structure `FF_Part_t` was used with `memcpy` to copy partition data
(`pxPartitions + xPartNr` into `p`) in ff_ioman.c, but it contains
bitfields:
typedef struct _SPart
{
uint32_t ulStartLBA;
uint32_t ulSectorCount;
uint32_t ucActive : 8,
ucPartitionID : 8,
bIsExtended : 1;
} FF_Part_t;
Test Steps
-----------
This is a general fix; no additional tests are required.
Checklist:
----------
- [ ] I have tested my changes. No regression in existing tests[NOT
TESTED].
- [ ] I have modified and/or added unit-tests to cover the code changes
in this Pull Request.
Related Issue
-----------
None opened
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.1 parent 0a38fb8 commit c8ab060
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
0 commit comments