forked from security/hakurei
internal/pipewire: increment remote sequence after establishing bounds
This avoids incrementing it twice proceeding from a partial message. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -681,11 +681,11 @@ func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err erro
|
||||
if header.Sequence != ctx.remoteSequence {
|
||||
return remaining, UnexpectedSequenceError(header.Sequence)
|
||||
}
|
||||
ctx.remoteSequence++
|
||||
|
||||
if len(remaining) < int(SizeHeader+header.Size) {
|
||||
return
|
||||
}
|
||||
ctx.remoteSequence++
|
||||
|
||||
proxy, ok := ctx.proxy[header.ID]
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user