internal/pipewire: bounds check against wire size
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m23s
Test / Hakurei (push) Successful in 3m22s
Test / Hpkg (push) Successful in 4m13s
Test / Sandbox (race detector) (push) Successful in 4m25s
Test / Hakurei (race detector) (push) Successful in 5m14s
Test / Flake checks (push) Successful in 1m25s
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m23s
Test / Hakurei (push) Successful in 3m22s
Test / Hpkg (push) Successful in 4m13s
Test / Sandbox (race detector) (push) Successful in 4m25s
Test / Hakurei (race detector) (push) Successful in 5m14s
Test / Flake checks (push) Successful in 1m25s
This covers cases where wire size is not known ahead of time. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
a0eb010aab
commit
2d7b896a8c
@ -349,7 +349,7 @@ func unmarshalCheckTypeBounds(data *[]byte, t Word, sizeP *Word) error {
|
|||||||
if wantSize != 0 && gotSize != wantSize {
|
if wantSize != 0 && gotSize != wantSize {
|
||||||
return &InconsistentSizeError{gotSize, wantSize}
|
return &InconsistentSizeError{gotSize, wantSize}
|
||||||
}
|
}
|
||||||
if len(*data)-8 < int(wantSize) {
|
if len(*data)-8 < int(gotSize) {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user