File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,10 @@ func UnpackRevert(data []byte) (string, error) {
365
365
if ! bytes .Equal (data [:4 ], revertSelector ) {
366
366
return "" , errors .New ("invalid data for unpacking" )
367
367
}
368
- typ , _ := NewType ("string" , "" , nil )
368
+ typ , err := NewType ("string" , "" , nil )
369
+ if err != nil {
370
+ return "" , err
371
+ }
369
372
unpacked , err := (Arguments {{Type : typ }}).Unpack (data [4 :])
370
373
if err != nil {
371
374
return "" , err
Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
151
151
Val []byte
152
152
Key []byte
153
153
}
154
- gob .NewDecoder (r ).Decode (& dec )
154
+ if err := gob .NewDecoder (r ).Decode (& dec ); err != nil {
155
+ return err
156
+ }
155
157
st .owner = dec .Owner
156
158
st .nodeType = dec .NodeType
157
159
st .val = dec .Val
@@ -165,7 +167,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
165
167
continue
166
168
}
167
169
var child StackTrie
168
- child .unmarshalBinary (r )
170
+ if err := child .unmarshalBinary (r ); err != nil {
171
+ return err
172
+ }
169
173
st .children [i ] = & child
170
174
}
171
175
return nil
You can’t perform that action at this time.
0 commit comments