mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -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
6f918561c9
commit
1ea84b2869
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,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