mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
*: Missing bounds checks in POD handling
There were missing bounds checks for ill-formed POD all over the place.
This commit is contained in:
parent
7ac94f1a69
commit
fb315b9050
7 changed files with 104 additions and 19 deletions
|
|
@ -524,8 +524,11 @@ uint32_t collect_transport_codec_info(struct pw_manager_object *card,
|
|||
if (iid != SPA_PROP_bluetoothAudioCodec)
|
||||
continue;
|
||||
|
||||
if (type->body.type != SPA_CHOICE_Enum ||
|
||||
type->body.child.type != SPA_TYPE_Int)
|
||||
if (type->pod.size < sizeof(struct spa_pod_choice_body) +
|
||||
2 * sizeof(int32_t) ||
|
||||
type->body.type != SPA_CHOICE_Enum ||
|
||||
type->body.child.type != SPA_TYPE_Int ||
|
||||
type->body.child.size != sizeof(int32_t))
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue