M17: FrameDecoder: decodeLich: added validation of LICH chunk number
This commit is contained in:
parent
7993074a6a
commit
4f791a8f09
|
|
@ -202,8 +202,12 @@ bool M17FrameDecoder::decodeLich(std::array < uint8_t, 6 >& segment,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Last byte of the segment contains the segment number, shift left
|
// 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;
|
segment[5] >>= 5;
|
||||||
|
|
||||||
|
if(segment[5] > 5)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue