mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: explicitly cast the offset to signed int
As reported by Marcello Blancasio, convert the offset to a signed int to avoid conversion without sign extension. Fixes unmap of stream memory. Fixes #103
This commit is contained in:
parent
416b9c254e
commit
b6f01542d8
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ struct spa_fraction {
|
|||
_v > _high ? _high : ( _v < _low ? _low : _v); \
|
||||
})
|
||||
|
||||
#define SPA_MEMBER(b,o,t) ((t*)((uint8_t*)(b) + (o)))
|
||||
#define SPA_MEMBER(b,o,t) ((t*)((uint8_t*)(b) + (int)(o)))
|
||||
|
||||
#define SPA_CONTAINER_OF(p,t,m) (t*)((uint8_t*)p - offsetof (t,m))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue