Re: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by

From: Kees Cook
Date: Sun Oct 01 2023 - 17:06:03 EST


On Sun, Oct 01, 2023 at 09:14:02PM +0200, Julia Lawall wrote:
> Kees,
>
> You can try the following.

Cool! Yeah, this finds the example:

drivers/comedi/drivers/rti800.c:74: struct comedi_lrange: field at offset 0 is the counter for the flex array
drivers/comedi/drivers/rti800.c:83: struct comedi_lrange: field at offset 0 is the counter for the flex array
drivers/comedi/drivers/rti800.c:92: struct comedi_lrange: field at offset 0 is the counter for the flex array

I'll run it on the whole codebase...

--
Kees Cook