Commit 7f180e4
committed
Avoid undefined behavior when decoding OID values in print-snmp
When decoding an OID, and shifting left by 7, mask off the top
7 bits first. This still results in GIGO, but avoids undefined
behavior on the way there. OIDs with values this large are not
supported by this code.1 parent 7b1e0b2 commit 7f180e4
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
| 756 | + | |
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | | - | |
| 906 | + | |
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| |||
0 commit comments