client-node: the id must be strictly smaller than MAX_AREAS

.. or else it points past the allocated array.
This commit is contained in:
Wim Taymans 2023-03-04 20:39:53 +01:00
parent 39ce32985b
commit a21da3802b

View file

@ -1354,7 +1354,7 @@ static int port_init_mix(void *data, struct pw_impl_port_mix *mix)
m->valid = false;
return -errno;
}
if (mix->id > MAX_AREAS) {
if (mix->id >= MAX_AREAS) {
pw_map_remove(&impl->io_map, mix->id);
m->valid = false;
return -ENOMEM;