Fix a few things...

This commit is contained in:
Adam Ierymenko 2021-05-25 14:40:40 -04:00
parent ed2360d9f7
commit 6b3a7ec827
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
4 changed files with 35 additions and 9 deletions

View file

@ -770,8 +770,10 @@ void Node::ncSendError(uint64_t nwid,uint64_t requestPacketId,const Address &des
outp.append(nwid);
if ((errorData)&&(errorDataSize > 0))
if ((errorData)&&(errorDataSize > 0)&&(errorDataSize <= 0xffff)) {
outp.append((uint16_t)errorDataSize);
outp.append(errorData, errorDataSize);
}
RR->sw->send((void *)0,outp,true);
} // else we can't send an ERROR() in response to nothing, so discard