fs/affs: struct affs_head: Replace 1-element array with flexible array
Subsystems (2)
PATCH 1/1 fs/affs: struct affs_head: Replace 1-element array with flexible array
AFFS uses struct affs_head's "table" array as a flexible array. Switch this to a proper flexible array[1]. There are no sizeof() uses; struct affs_head is only ever uses via direct casts. No binary output differences were found after this change.
Signed-off-by Kees Cook <[email protected]>
---
Cc: David Sterba <[email protected]>
Cc: [email protected]
--- fs/affs/amigaffs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/affs/amigaffs.h +1 -1
@@ -80,7 +80,7 @@ struct affs_head {__be32 spare1;__be32 first_data;__be32 checksum; -__be32 table[1 ]; +__be32 table[]; };struct affs_tail {
Signature · 1 line
2.34.1
Quoted 7 lines · Kees Cook
AFFS uses struct affs_head's "table" array as a flexible array. Switch this to a proper flexible array[1]. There are no
sizeof()uses; structaffs_headis only ever uses via direct casts. No binary output differences were found after this change.Signed-off-by Kees Cook <[email protected]>
Reviewed-by Gustavo A. R. Silva <[email protected]>
Thanks
Signature · 1 line
Gustavo
Quoted 20 lines
---
Cc: David Sterba <[email protected]>
Cc: [email protected]--- fs/affs/amigaffs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/affs/amigaffs.h +1
-1@@ -80,7 +80,7 @@ struct affs_head {__be32 spare1;__be32 first_data;__be32 checksum; -__be32 table[1 ]; +__be32 table[]; };struct affs_tail {