From b1b27ac1df43d39b856983b4e930204b1a0f2e71 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 25 Nov 2025 12:21:37 +0900 Subject: [PATCH] internal/pipewire: zero size before validation Leftover values from previous invocations cause incorrect behaviour here. Signed-off-by: Ophestra --- internal/pipewire/pod.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/pipewire/pod.go b/internal/pipewire/pod.go index 6281913..9fb9c78 100644 --- a/internal/pipewire/pod.go +++ b/internal/pipewire/pod.go @@ -260,6 +260,7 @@ func unmarshalValue(data []byte, v reflect.Value, sizeP *Word) error { return nil case reflect.Struct: + *sizeP = 0 if err := unmarshalCheckTypeBounds(&data, SPA_TYPE_Struct, sizeP); err != nil { return err } @@ -294,6 +295,7 @@ func unmarshalValue(data []byte, v reflect.Value, sizeP *Word) error { } case reflect.String: + *sizeP = 0 if err := unmarshalCheckTypeBounds(&data, SPA_TYPE_String, sizeP); err != nil { return err }