mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Check fec type in incoming messages in RLDP
This commit is contained in:
parent
b96ab80dfd
commit
e05af05635
3 changed files with 36 additions and 18 deletions
|
@ -125,6 +125,10 @@ void RldpTransferReceiverImpl::receive_part(fec::FecType fec_type, td::uint32 pa
|
|||
}
|
||||
|
||||
if (!decoder_) {
|
||||
if (offset_ + fec_type.size() > total_size_) {
|
||||
VLOG(RLDP_NOTICE) << "failed to create decoder: data size in fec type is too big";
|
||||
return;
|
||||
}
|
||||
auto D = fec_type.create_decoder();
|
||||
if (D.is_error()) {
|
||||
VLOG(RLDP_WARNING) << "failed to create decoder: " << D.move_as_error();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue