Commit caa6a0e
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 c7d5eba commit caa6a0e
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7576 | 7576 | | |
7577 | 7577 | | |
7578 | 7578 | | |
7579 | | - | |
| 7579 | + | |
7580 | 7580 | | |
7581 | 7581 | | |
7582 | 7582 | | |
| |||
7586 | 7586 | | |
7587 | 7587 | | |
7588 | 7588 | | |
7589 | | - | |
| 7589 | + | |
7590 | 7590 | | |
| 7591 | + | |
| 7592 | + | |
| 7593 | + | |
7591 | 7594 | | |
7592 | 7595 | | |
7593 | | - | |
| 7596 | + | |
7594 | 7597 | | |
7595 | 7598 | | |
7596 | 7599 | | |
| |||
14927 | 14930 | | |
14928 | 14931 | | |
14929 | 14932 | | |
14930 | | - | |
14931 | | - | |
| 14933 | + | |
| 14934 | + | |
| 14935 | + | |
| 14936 | + | |
| 14937 | + | |
| 14938 | + | |
| 14939 | + | |
| 14940 | + | |
14932 | 14941 | | |
| 14942 | + | |
14933 | 14943 | | |
14934 | 14944 | | |
14935 | 14945 | | |
| |||
0 commit comments