Skip to content

Commit 116249b

Browse files
tobluxjankara
authored andcommitted
isofs: Annotate struct SL_component with __counted_by()
Add the __counted_by compiler attribute to the flexible array member text to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20240830164902.112682-2-thorsten.blum@toblux.com
1 parent edb46dd commit 116249b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/isofs/rock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct RR_PN_s {
4444
struct SL_component {
4545
__u8 flags;
4646
__u8 len;
47-
__u8 text[];
47+
__u8 text[] __counted_by(len);
4848
} __attribute__ ((packed));
4949

5050
struct RR_SL_s {

0 commit comments

Comments
 (0)