mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-12 14:34:42 -04:00
08ff033dc3
cppcheck reported an out-of-bounds access in APRSPacket::parseItem() when parsing item names. The parser checked the string length using an incorrect boundary condition, allowing an index equal to the string length to be accessed. Validate the item terminator before indexing the string, and ensure malformed packets without a valid terminator are rejected. Also simplify the item name parsing logic while enforcing the APRS 3-9 character item name limit. Signed-off-by: Robin Getz <rgetz503@gmail.com>