avb: validate random data for xsubi

This commit is contained in:
Thomas Weißschuh 2022-08-19 08:29:58 +02:00 committed by Wim Taymans
parent f2e1827e18
commit a969feb3c0

View file

@ -421,7 +421,10 @@ struct avb_maap *avb_maap_register(struct server *server)
maap->server = server; maap->server = server;
pw_log_info("0x%"PRIx64" %d", server->entity_id, server->ifindex); pw_log_info("0x%"PRIx64" %d", server->entity_id, server->ifindex);
pw_getrandom(maap->xsubi, sizeof(maap->xsubi), 0); if (pw_getrandom(maap->xsubi, sizeof(maap->xsubi), 0) != sizeof(maap->xsubi)) {
res = -errno;
goto error;
}
load_state(maap); load_state(maap);
maap->source = pw_loop_add_io(server->impl->loop, fd, SPA_IO_IN, true, on_socket_data, maap); maap->source = pw_loop_add_io(server->impl->loop, fd, SPA_IO_IN, true, on_socket_data, maap);