Ed Catmur
983325bfdf
Ensure TCP::OptionTypes has 8-bit range ( #259 )
...
When reading TCP packets with esoteric (or corrupt) values for option types, the asan fsanitize=enum will trigger if the read value is not in range of the enum. The range of a classic (pre-C++11) enum with no negative enumerators is determined by the highest bit set in any of its enumerators, so if `TCP::OptionTypes` has highest enumerator `ALTCHK = 14` it cannot take values above 15.
Define enumerators (per IANA) with bit 7 set to ensure that `TCP::OptionTypes` can take any 8-bit value.
An alternative (C++11 only) would be to give `TCP::OptionTypes` underlying type `uint8_t`.
2017-10-19 10:17:51 -07:00
..
2017-09-21 20:48:57 -07:00
2017-10-04 07:03:17 -07:00
2017-09-21 20:48:57 -07:00
2017-10-18 06:40:51 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-03-21 19:04:33 -07:00
2017-06-05 20:44:03 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-06-05 20:44:03 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-06-05 20:44:03 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-10-01 20:38:54 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-10-01 20:38:54 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-06-05 20:44:03 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-10-12 20:02:28 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-06-05 20:44:03 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-10-19 10:17:51 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00
2017-09-21 20:48:57 -07:00