summaryrefslogtreecommitdiff
path: root/fs/isofs
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-08-30 18:49:03 +0200
committerJan Kara <jack@suse.cz>2024-09-02 15:52:56 +0200
commit116249b12939a8ec13eb50f36b6fffd1c719a9ed (patch)
tree141fc26a3a4538e1e5e4861e96d072d085813231 /fs/isofs
parentedb46ddbc55e53eef3d6e575087baa315598d253 (diff)
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
Diffstat (limited to 'fs/isofs')
-rw-r--r--fs/isofs/rock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/isofs/rock.h b/fs/isofs/rock.h
index ee9660e9671c..7755e587f778 100644
--- a/fs/isofs/rock.h
+++ b/fs/isofs/rock.h
@@ -44,7 +44,7 @@ struct RR_PN_s {
struct SL_component {
__u8 flags;
__u8 len;
- __u8 text[];
+ __u8 text[] __counted_by(len);
} __attribute__ ((packed));
struct RR_SL_s {