mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
spa: param: add size checks for spa_audio_info* structs
In the API that take struct size for spa_audio_info*, also check the struct size.
This commit is contained in:
parent
8a23b13798
commit
c6d0b364ab
7 changed files with 197 additions and 3 deletions
|
|
@ -293,6 +293,8 @@ struct spa_audio_info_raw {
|
|||
|
||||
#define SPA_AUDIO_INFO_RAW_MAX_POSITION(size) (((size)-offsetof(struct spa_audio_info_raw,position))/sizeof(uint32_t))
|
||||
|
||||
#define SPA_AUDIO_INFO_RAW_VALID_SIZE(size) ((size) >= offsetof(struct spa_audio_info_raw, position))
|
||||
|
||||
|
||||
#define SPA_KEY_AUDIO_FORMAT "audio.format" /**< an audio format as string,
|
||||
* Ex. "S16LE" */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue