Commit 2eb5203
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 b62bf24 commit 2eb5203
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
| 759 | + | |
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
909 | | - | |
| 909 | + | |
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| |||
0 commit comments