Ver código fonte

merge Bug-Hunt-III into main

main
Jan 1 mês atrás
pai
commit
405f697e35
1 arquivos alterados com 5 adições e 1 exclusões
  1. +5
    -1
      aoiprxkit/rtp.go

+ 5
- 1
aoiprxkit/rtp.go Ver arquivo

@@ -63,6 +63,10 @@ func ParseRTPPacket(buf []byte) (RTPPacket, error) {
}
payload = payload[:len(payload)-padLen]
}
p.Payload = payload
// ALIASING FIX: copy payload bytes before returning. The caller reuses
// the receive buffer on every ReadFromUDP call, so any RTPPacket stored
// in the jitter buffer for later delivery would have its Payload slice
// silently overwritten by the next incoming packet.
p.Payload = append([]byte(nil), payload...)
return p, nil
}

Carregando…
Cancelar
Salvar