ALSA: control: Annotate snd_kcontrol with __counted_by()
struct snd_kcontrol contains a flex array of snd_kcontrol_volatile objects at its end, and the array size is stored in count field. This can be annotated gracefully with __counted_by() for catching possible array overflows. One additional change is the order of the count field initialization; The assignment of the count field is moved before assignment of vd[] elements for avoiding false-positive warnings from compilers. Link: https://patch.msgid.link/20240726152840.8629-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
Showing
Please register or sign in to comment