mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pod: check that choices are not empty
Before using the contents of a choice, check that it is not empty to avoid reading out of bounds.
This commit is contained in:
parent
d37bdf5cbf
commit
b04da87e38
7 changed files with 18 additions and 4 deletions
|
|
@ -2311,6 +2311,8 @@ static int vidioc_s_ctrl(struct file *file, struct v4l2_control *arg)
|
|||
struct spa_pod_frame f[1];
|
||||
struct spa_pod *param;
|
||||
pod = spa_pod_get_values(type, &n_vals, &choice);
|
||||
if (n_vals < 1)
|
||||
break;
|
||||
|
||||
spa_pod_builder_push_object(&b, &f[0],
|
||||
SPA_TYPE_OBJECT_Props, SPA_PARAM_Props);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue