mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-11 13:30:07 -05:00
iter: check if size can hold a spa_pod
This commit is contained in:
parent
e28b5b8232
commit
6ad52b1a11
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ static inline struct spa_pod_control *spa_pod_control_next(const struct spa_pod_
|
||||||
static inline void *spa_pod_from_data(void *data, size_t maxsize, off_t offset, size_t size)
|
static inline void *spa_pod_from_data(void *data, size_t maxsize, off_t offset, size_t size)
|
||||||
{
|
{
|
||||||
void *pod;
|
void *pod;
|
||||||
if (offset + size > maxsize)
|
if (size < sizeof(struct spa_pod) || offset + size > maxsize)
|
||||||
return NULL;
|
return NULL;
|
||||||
pod = SPA_MEMBER(data, offset, void);
|
pod = SPA_MEMBER(data, offset, void);
|
||||||
if (SPA_POD_SIZE(pod) > size)
|
if (SPA_POD_SIZE(pod) > size)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue