Commit 3f8a1b8
committed
Coverity: Untrusted divisor
1. The individual bytes of the value read by ato32() are promoted to
int values. Added typecasts to word32 for each of the bytes of the
32-bit value so they are treated as unsigned values like the target
type. Also shifted each byte separately after masking them and then
oring them into a temp.
2. To get the e value from the KexDhInit message, use the
GetStringRef() function.
3. Add bounds checking of eSz.
Fixes CID: 5728371 parent 7d48298 commit 3f8a1b8
2 files changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4751 | 4751 | | |
4752 | 4752 | | |
4753 | 4753 | | |
4754 | | - | |
| 4754 | + | |
4755 | 4755 | | |
4756 | 4756 | | |
4757 | 4757 | | |
| |||
4770 | 4770 | | |
4771 | 4771 | | |
4772 | 4772 | | |
4773 | | - | |
4774 | 4773 | | |
4775 | | - | |
4776 | 4774 | | |
4777 | | - | |
| 4775 | + | |
4778 | 4776 | | |
4779 | 4777 | | |
4780 | 4778 | | |
4781 | 4779 | | |
4782 | | - | |
4783 | | - | |
4784 | | - | |
| 4780 | + | |
| 4781 | + | |
4785 | 4782 | | |
4786 | 4783 | | |
4787 | 4784 | | |
4788 | | - | |
4789 | | - | |
4790 | | - | |
4791 | | - | |
4792 | | - | |
4793 | | - | |
4794 | | - | |
| 4785 | + | |
| 4786 | + | |
4795 | 4787 | | |
4796 | 4788 | | |
4797 | 4789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
| |||
0 commit comments