mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-08 08:21:04 -04:00
test: fix pod size
It's at least 24 bytes, 8 for struct header, 8 for int header and 8 for int data.
This commit is contained in:
parent
5474c3c3a5
commit
abd8c8f666
1 changed files with 3 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue