From abd8c8f666066d8793a81a00d1191b09997484dd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Apr 2026 11:28:04 +0200 Subject: [PATCH] test: fix pod size It's at least 24 bytes, 8 for struct header, 8 for int header and 8 for int data. --- src/modules/module-protocol-native/test-connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-native/test-connection.c b/src/modules/module-protocol-native/test-connection.c index ef50fe9ba..0c82d2da8 100644 --- a/src/modules/module-protocol-native/test-connection.c +++ b/src/modules/module-protocol-native/test-connection.c @@ -211,7 +211,7 @@ static void test_spoofed_fds(struct pw_protocol_native_connection *in, */ { /* Build a tiny SPA pod: struct { Int(0) } */ - uint8_t payload[16]; + uint8_t payload[32]; struct spa_pod_builder pb; spa_pod_builder_init(&pb, payload, sizeof(payload)); @@ -220,6 +220,8 @@ static void test_spoofed_fds(struct pw_protocol_native_connection *in, uint32_t payload_size = pb.state.offset; uint32_t header[4]; + spa_assert_se(payload_size <= sizeof(payload)); + header[0] = 1; /* id */ header[1] = (5u << 24) | (payload_size & 0xffffff); /* opcode=5, size */ header[2] = 0; /* seq */