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:
Pauli Virtanen 2025-10-26 17:51:01 +02:00
parent 8a23b13798
commit c6d0b364ab
7 changed files with 197 additions and 3 deletions

View file

@ -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" */