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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -42,7 +42,7 @@ struct sockaddr_alg_new { · 41 unmodified lines | |||
| 42 | 42 | ||
| 43 | struct af_alg_iv { | 43 | struct af_alg_iv { |
| 44 | __u32 ivlen; | 44 | __u32 ivlen; |
| 45 | __u8 iv[]; | 45 | __u8 iv[] __counted_by(ivlen); |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | /* Socket options */ | 48 | /* Socket options */ |