From 2c11f65701c814605a60c0f587ac5d2ec30ae099 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 30 Jul 2025 11:02:00 +0200 Subject: [PATCH] pod: avoid child size check This will give us 0 children later and is not a problem for this function. --- spa/include/spa/pod/body.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/spa/include/spa/pod/body.h b/spa/include/spa/pod/body.h index 9ab2ae7e3..2da4122e2 100644 --- a/spa/include/spa/pod/body.h +++ b/spa/include/spa/pod/body.h @@ -327,8 +327,6 @@ SPA_API_POD_BODY int spa_pod_body_get_choice(const struct spa_pod *pod, const vo return -EINVAL; choice->pod = *pod; memcpy(&choice->body, body, sizeof(struct spa_pod_choice_body)); - if (choice->pod.size - sizeof(struct spa_pod_choice_body) < choice->body.child.size) - return -EINVAL; *choice_body = SPA_PTROFF(body, sizeof(struct spa_pod_choice_body), void); return 0; }