diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-05 03:29:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-05 03:29:23 +0800 |
commit | 59597d23a5ee268c66df96b930f651256661b8c5 (patch) | |
tree | 33939393d79fe13929bedd38e2221d30defbd62c /rlp/decode_test.go | |
parent | c39484bc4b099881c3aa164d33b5ba95c55f36fa (diff) | |
download | dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar.gz dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar.bz2 dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar.lz dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar.xz dexon-59597d23a5ee268c66df96b930f651256661b8c5.tar.zst dexon-59597d23a5ee268c66df96b930f651256661b8c5.zip |
Reject integers w/ appended zero's
Diffstat (limited to 'rlp/decode_test.go')
-rw-r--r-- | rlp/decode_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rlp/decode_test.go b/rlp/decode_test.go index a18ff1d08..73a31c67f 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -312,6 +312,7 @@ var decodeTests = []decodeTest{ // big ints {input: "01", ptr: new(*big.Int), value: big.NewInt(1)}, {input: "89FFFFFFFFFFFFFFFFFF", ptr: new(*big.Int), value: veryBigInt}, + {input: "820001", ptr: new(big.Int), error: "rlp: canon int error appends zero's for *big.Int"}, {input: "10", ptr: new(big.Int), value: *big.NewInt(16)}, // non-pointer also works {input: "C0", ptr: new(*big.Int), error: "rlp: expected input string or byte for *big.Int"}, |