Commit 88553f6
committed
tls: fix TLSX_CA_Names_GetSize word16 overflow (F-2927)
The CA Names extension size accumulator was a word16. With enough
CA entries (or large DER-encoded names) the running total can wrap
silently, leaving TLSX_CA_Names_Write to overflow an undersized
extension buffer. Match TLSX_SNI_GetSize: use a word32 accumulator
and return 0 when the total exceeds WOLFSSL_MAX_16BIT.1 parent 28dc5ab commit 88553f6
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7573 | 7573 | | |
7574 | 7574 | | |
7575 | 7575 | | |
7576 | | - | |
| 7576 | + | |
7577 | 7577 | | |
7578 | 7578 | | |
7579 | 7579 | | |
| |||
7583 | 7583 | | |
7584 | 7584 | | |
7585 | 7585 | | |
7586 | | - | |
| 7586 | + | |
7587 | 7587 | | |
| 7588 | + | |
| 7589 | + | |
| 7590 | + | |
7588 | 7591 | | |
7589 | 7592 | | |
7590 | | - | |
| 7593 | + | |
7591 | 7594 | | |
7592 | 7595 | | |
7593 | 7596 | | |
| |||
0 commit comments