mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: validate empty item in p2p start_send (#7294)
This commit is contained in:
@ -581,6 +581,11 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
if item.is_empty() {
|
||||
// empty messages are not allowed
|
||||
return Err(P2PStreamError::EmptyProtocolMessage)
|
||||
}
|
||||
|
||||
// ensure we have free capacity
|
||||
if !self.has_outgoing_capacity() {
|
||||
return Err(P2PStreamError::SendBufferFull)
|
||||
|
||||
Reference in New Issue
Block a user