Commit b18e1f82 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix: Stricter RLP boolean checking (#343)

Co-authored-by: default avatarMaurelian <maurelian@protonmail.ch>
parent fb35aaef
......@@ -353,6 +353,11 @@ library Lib_RLPReader {
out := byte(0, mload(ptr))
}
require(
out == 0 || out == 1,
"Lib_RLPReader: Invalid RLP boolean value, must be 0 or 1"
);
return out != 0;
}
......
......@@ -16,6 +16,12 @@
"out": [
false
]
},
"something other than 0 or 1 (should revert)": {
"in": [
"0x02"
],
"revert": true
}
},
"readAddress": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment