mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
crypto: af_alg - Annotate struct af_alg_iv with __counted_by
Add the __counted_by() compiler attribute to the flexible array member 'iv' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Kees Cook <[email protected]>
This commit is contained in:
1 parent
1d1fd18869
commit
dacbfc1678
1 file changed
+1
-1
@@ -42,7 +42,7 @@ struct sockaddr_alg_new {
|
||||
|
||||
struct af_alg_iv {
|
||||
__u32 ivlen;
|
||||
__u8 iv[];
|
||||
__u8 iv[] __counted_by(ivlen);
|
||||
};
|
||||
|
||||
/* Socket options */
|
||||
|
||||
Reference in new issue
Block a user