Merge pull request #302 from atsampson/acknsize

Check the size of PROTMESSID_ACKN messages
This commit is contained in:
Volker Fischer 2020-05-28 07:22:59 +02:00 committed by GitHub
commit 64c4eb4448
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -556,6 +556,12 @@ if ( rand() < ( RAND_MAX / 2 ) ) return false;
// special treatment for acknowledge messages // special treatment for acknowledge messages
if ( iRecID == PROTMESSID_ACKN ) if ( iRecID == PROTMESSID_ACKN )
{ {
// check size
if ( vecbyMesBodyData.Size() != 2 )
{
return true; // return error code
}
// extract data from stream and emit signal for received value // extract data from stream and emit signal for received value
int iPos = 0; int iPos = 0;
const int iData = const int iData =