Commit 2003e48
committed
fortify: Do not special-case 0-sized destinations
All fake flexible arrays should have been removed now, so remove the
special casing that was avoiding checking them. If a destination claims
to be 0 sized, believe it. This is especially important for cases where
__counted_by is in use and may have a 0 element count.
Link: https://lore.kernel.org/r/20240619203105.work.747-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>1 parent d6f635b commit 2003e48
2 files changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 604 | + | |
609 | 605 | | |
610 | 606 | | |
611 | 607 | | |
612 | 608 | | |
613 | 609 | | |
614 | 610 | | |
615 | 611 | | |
616 | | - | |
| 612 | + | |
617 | 613 | | |
618 | 614 | | |
619 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
913 | | - | |
914 | 913 | | |
915 | 914 | | |
916 | | - | |
| 915 | + | |
917 | 916 | | |
918 | 917 | | |
919 | 918 | | |
| |||
0 commit comments