internal/pipewire: bounds check against wire size

This covers cases where wire size is not known ahead of time.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-25 13:42:31 +09:00
parent a0eb010aab
commit 2d7b896a8c

View File

@@ -349,7 +349,7 @@ func unmarshalCheckTypeBounds(data *[]byte, t Word, sizeP *Word) error {
if wantSize != 0 && gotSize != wantSize {
return &InconsistentSizeError{gotSize, wantSize}
}
if len(*data)-8 < int(wantSize) {
if len(*data)-8 < int(gotSize) {
return io.ErrUnexpectedEOF
}