mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 22:36:17 +01:00
ecryptfs: Annotate struct ecryptfs_message with __counted_by
Add the __counted_by() compiler attribute to the flexible array member 'data' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Tyler Hicks <code@tyhicks.com> Link: https://patch.msgid.link/20260112115314.739612-2-thorsten.blum@linux.dev Signed-off-by: Kees Cook <kees@kernel.org>
This commit is contained in:
parent
7583873c31
commit
cc34c669ab
1 changed files with 1 additions and 1 deletions
|
|
@ -359,7 +359,7 @@ struct ecryptfs_message {
|
|||
/* Inherits from msg_ctx->index */
|
||||
u32 index;
|
||||
u32 data_len;
|
||||
u8 data[];
|
||||
u8 data[] __counted_by(data_len);
|
||||
};
|
||||
|
||||
struct ecryptfs_msg_ctx {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue