M17: FrameDecoder: decodeLich: added validation of LICH chunk number

This commit is contained in:
Silvano Seva 2024-12-23 12:40:57 +01:00
parent 7993074a6a
commit 4f791a8f09
1 changed files with 5 additions and 1 deletions

View File

@ -202,8 +202,12 @@ bool M17FrameDecoder::decodeLich(std::array < uint8_t, 6 >& segment,
}
// Last byte of the segment contains the segment number, shift left
// by five when packing the LICH.
// by five when packing the LICH. The segment number must range between
// zero and five.
segment[5] >>= 5;
if(segment[5] > 5)
return false;
return true;
}