Commit 62a72aa
committed
TFM bounds checks for safety
fp_to_unsigned_bin_len did not deal with negative input length - fails early
now. No code in wolfSSL calls mp_to_unsigned_bin_len with a negative len.
fp_is_bit_set and fp_set_bit check for greater than or equal to FP_MAX_BITS
instead of just greater. Check doesn't cause issues as FP_MAX_SIZE has padding
but it was the wrong check.1 parent 4a7695e commit 62a72aa
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3969 | 3969 | | |
3970 | 3970 | | |
3971 | 3971 | | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
3972 | 3976 | | |
3973 | 3977 | | |
3974 | 3978 | | |
| |||
3990 | 3994 | | |
3991 | 3995 | | |
3992 | 3996 | | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
3993 | 4001 | | |
3994 | 4002 | | |
3995 | 4003 | | |
| |||
4071 | 4079 | | |
4072 | 4080 | | |
4073 | 4081 | | |
4074 | | - | |
| 4082 | + | |
4075 | 4083 | | |
4076 | 4084 | | |
4077 | 4085 | | |
| |||
4087 | 4095 | | |
4088 | 4096 | | |
4089 | 4097 | | |
4090 | | - | |
| 4098 | + | |
4091 | 4099 | | |
4092 | 4100 | | |
4093 | 4101 | | |
| |||
0 commit comments