| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Input strings of length 1 containing a byte < 56 are non-minimal and
should be encoded as a single byte instead. Reject such strings.
|
|
|
|
|
|
|
| |
All integers (including size information in type tags) need to be
encoded using the smallest possible encoding. This commit expands the
stricter validation introduced for *big.Int in commit 59597d23a5ee268
to all integer types and size tags.
|
|
|
|
|
|
| |
A single zero byte carries information and should not set the pointer
to nil. This is arguably a corner case. While here, fix the comment
to explain pointer reuse.
|
|
|
|
| |
It is not safe to add anything to s.size.
|
|
|
|
|
|
| |
This is a preliminary fix for #420 (SEC-18 RLP decoder unsafe
allocation). If a sane input limit is set on the rlp.Stream,
it should no longer be possible to cause huge []byte allocations.
|
| |
|
| |
|
|
|
|
|
|
| |
The generic pointer decoder did not advance the input position
for empty values. This can lead to strange issues and even
infinite loops.
|
|
|
|
|
|
|
|
| |
This needs to be supported because []someInterface does occur sometimes.
Funny enough, the fix involves changes to the decoder. makeDecoder
cannot return an error for non-empty interfaces anymore because the type
cache builds both decoder and writer. Do the check at 'runtime' instead.
|
| |
|
|
|
|
|
|
|
|
| |
I'm reasonably confident that the encoding matches the output of
ethutil.Encode for values that it supports. Some of the tests have been
adpated from the Ethereum testing repository.
There are still TODOs in the code.
|
| |
|
|
|
|
|
| |
Decode error messages now say "expected input list for foo.MyStruct"
instead of just "expected List".
|
|
|
|
|
| |
There is no agreement on how to encode negative integers
across implementations. cpp-ethereum doesn't support them either.
|
| |
|
| |
|
| |
|
| |
|
|
|