Skip to content

Commit

Permalink
Fixed in FEC crash when a large number of dropped packets occur causi… (
Browse files Browse the repository at this point in the history
#892)

* Fixed in FEC crash when a large number of dropped packets occur causing celloff to become negative and therefore accessing out of bounds for rcv.cells deque. This crash can be reproduced by putting Clumsy.exe (Dropped packet / latency simulator) between two machines and turning on lag (200ms will do it) and then turning it off, this causes a consistent crash of SRT.
  • Loading branch information
RobEwbank authored and rndi committed Sep 30, 2019
1 parent 84b56ca commit c39b88a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srtcore/fec.cpp
Expand Up @@ -696,7 +696,7 @@ bool FECFilterBuiltin::receive(const CPacket& rpkt, loss_seqs_t& loss_seqs)
// be simultaneously also retransmitted. This may confuse the tables.
int celloff = CSeqNo::seqoff(rcv.cell_base, rpkt.getSeqNo());
bool past = celloff < 0;
bool exists = celloff < int(rcv.cells.size()) && rcv.cells[celloff];
bool exists = celloff < int(rcv.cells.size()) && !past && rcv.cells[celloff];

if (past || exists)
{
Expand Down

0 comments on commit c39b88a

Please sign in to comment.