Skip to content

Commit

Permalink
affs: struct affs_head: Replace 1-element array with flexible array
Browse files Browse the repository at this point in the history
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.

Link: KSPP#79 [1]
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kees authored and kdave committed Jul 11, 2024
1 parent 256abd8 commit 38a381a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/affs/amigaffs.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct affs_head {
__be32 spare1;
__be32 first_data;
__be32 checksum;
__be32 table[1];
__be32 table[];
};

struct affs_tail {
Expand Down

0 comments on commit 38a381a

Please sign in to comment.