Commit 507fc7b9 authored by obscuren's avatar obscuren

Length checking when fetching contract. Contract always have 3 fields

parent 4f4175a3
...@@ -131,6 +131,11 @@ func (block *Block) GetContract(addr []byte) *Contract { ...@@ -131,6 +131,11 @@ func (block *Block) GetContract(addr []byte) *Contract {
return nil return nil
} }
value := ethutil.NewValueFromBytes([]byte(data))
if value.Len() == 2 {
return nil
}
contract := &Contract{} contract := &Contract{}
contract.RlpDecode([]byte(data)) contract.RlpDecode([]byte(data))
......
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