mirror of https://github.com/status-im/nim-eth.git
522db295f2
RLP Enum deserialization would currently not check if "hole values" were attempted to be converted to the enum type. Now use checkedEnumAssign and fail with RlpTypeMismatch on invalid values. There is at least one occurance of an enum with holes in rlpx p2p: DisconnectionReason. For this enum the issue could occur. Also: - Added enum RLP tests and rlpx p2p disconnect message tests to test the DisconnectionReason with enum hole value. - Fixed worse custom DisconnectionReason decoding occurance in rlpx in waitSingleMsg proc where this issue could occur. |
||
---|---|---|
.. | ||
p2p_types.nim |