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 <[email protected]> Signed-off-by: Jan Kara <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent edb46dd commit 116249b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)