Assume the payload from malicious firmware is packed like belowcap = &caps[core->codecs_count++];I don't see how codecs_count could be greater than the control, since you
cap->codec = BIT(bit);
cap->domain = VIDC_SESSION_TYPE_ENC;
increment by one on each loop but >= is fine too I suppose.
HFI_PROPERTY_PARAM_CODEC_SUPPORTED
HFI_PROPERTY_PARAM_CODEC_SUPPORTED
HFI_PROPERTY_PARAM_CODEC_SUPPORTED
.....
for 32 or more instances of above type