Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix crash case in FEC filter #891

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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