Skip to content

Commit

Permalink
[core] Fix FEC crash for access container out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
sorayuki authored and rndi committed Oct 22, 2019
1 parent 1df240e commit 3d5ffe2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion srtcore/fec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ bool FECFilterBuiltin::IsLost(int32_t seq) const
<< " is earlier than the cell base %" << rcv.cell_base);
return true; // fake we have the packet - this is to collect losses only
}
if (offset > int(rcv.cells.size()))
if (offset >= int(rcv.cells.size()))
{
// XXX IPE!
LOGC(mglog.Error, log << "FEC: IsLost: IPE: %" << seq << " is past the cells %"
Expand Down Expand Up @@ -1709,6 +1709,12 @@ void FECFilterBuiltin::RcvCheckDismissColumn(int32_t seq, int colgx, loss_seqs_t
<< " with required %" << CSeqNo::incseq(base0, mindist)
<< " but col container size still " << rcv.colq.size());
}
else if (rcv.rowq.size() < numberRows())
{
HLOGC(mglog.Debug, log << "FEC/V: IPE: about to dismiss past %" << seq
<< " with required %" << CSeqNo::incseq(base0, mindist)
<< " but row container size still " << rcv.rowq.size());
}
else
{
// The condition for dismissal is now. The number of dismissed columns
Expand Down

0 comments on commit 3d5ffe2

Please sign in to comment.