RC_Channel: Fix possible user induced out of bounds write

CID 308348
This commit is contained in:
Michael du Breuil 2018-08-06 18:59:46 -07:00 committed by Peter Barker
parent cbe68b4a91
commit e7ebea55d2

View File

@ -541,7 +541,7 @@ bool RC_Channels::duplicate_options_exist()
continue;
}
const uint16_t option = c->option.get();
if (option > sizeof(auxsw_option_counts)) {
if (option >= sizeof(auxsw_option_counts)) {
continue;
}
auxsw_option_counts[option]++;