Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by

Use the __counted_by compiler attribute for the data[] flexible array
member to improve the results of array bound sanitizers.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-1-3ee0ead2e57d@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Javier Carrasco and committed by
Dmitry Torokhov
e8135f9d 9b924739

+1 -1
+1 -1
drivers/input/misc/ims-pcu.c
··· 761 761 struct ims_pcu_flash_fmt { 762 762 __le32 addr; 763 763 u8 len; 764 - u8 data[]; 764 + u8 data[] __counted_by(len); 765 765 }; 766 766 767 767 static unsigned int ims_pcu_count_fw_records(const struct firmware *fw)