Commit 8515e4a
committed
checkpatch: Check for 0-length and 1-element arrays
Fake flexible arrays have been deprecated since last millennium. Proper
C99 flexible arrays must be used throughout the kernel so
CONFIG_FORTIFY_SOURCE and CONFIG_UBSAN_BOUNDS can provide proper array
bounds checking.
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Fixed-by: Joe Perches <joe@perches.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/20230517204530.never.151-kees@kernel.org1 parent 8762606 commit 8515e4a
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7430 | 7430 | | |
7431 | 7431 | | |
7432 | 7432 | | |
| 7433 | + | |
| 7434 | + | |
| 7435 | + | |
| 7436 | + | |
| 7437 | + | |
| 7438 | + | |
| 7439 | + | |
| 7440 | + | |
| 7441 | + | |
| 7442 | + | |
7433 | 7443 | | |
7434 | 7444 | | |
7435 | 7445 | | |
| |||
0 commit comments