mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pod: fix alignment check
Use the platform specific alignment for the spa_pod instead of 8. Fixes things on 32 bits.
This commit is contained in:
parent
41fd8144f0
commit
07fd063a0d
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ spa_pod_parser_deref(struct spa_pod_parser *parser, uint32_t offset, uint32_t si
|
||||||
* Check that the pointer is aligned and that the size (rounded
|
* Check that the pointer is aligned and that the size (rounded
|
||||||
* to the next multiple of 8) is in bounds.
|
* to the next multiple of 8) is in bounds.
|
||||||
*/
|
*/
|
||||||
if (SPA_IS_ALIGNED(pod, 8) &&
|
if (SPA_IS_ALIGNED(pod, __alignof__(struct spa_pod)) &&
|
||||||
long_offset + SPA_ROUND_UP_N((uint64_t)SPA_POD_BODY_SIZE(pod), 8) <= size)
|
long_offset + SPA_ROUND_UP_N((uint64_t)SPA_POD_BODY_SIZE(pod), 8) <= size)
|
||||||
return (struct spa_pod *)pod;
|
return (struct spa_pod *)pod;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue