From 22243d5ce9fb012968b24b1775116822e57dc129 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 8 May 2026 10:32:28 +0200 Subject: [PATCH] sendspin: handle parse_player errors Otherwise, this might leave the stride 0 and cause a division by 0 later. --- src/modules/module-sendspin-recv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-sendspin-recv.c b/src/modules/module-sendspin-recv.c index 9380165f2..f76bfde6d 100644 --- a/src/modules/module-sendspin-recv.c +++ b/src/modules/module-sendspin-recv.c @@ -777,10 +777,12 @@ static int handle_stream_start(struct client *client, struct spa_json *payload) while ((l = spa_json_object_next(payload, key, sizeof(key), &v)) > 0) { if (spa_streq(key, "player")) { + int res; if (!spa_json_is_object(v, l)) return -EPROTO; spa_json_enter(payload, &it[0]); - parse_player(client, &it[0]); + if ((res = parse_player(client, &it[0])) < 0) + return res; } }