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 @@ -246,7 +246,10 @@ func UnpackRevert(data []byte) (string, error) {
246
246
if ! bytes .Equal (data [:4 ], revertSelector ) {
247
247
return "" , errors .New ("invalid data for unpacking" )
248
248
}
249
- typ , _ := NewType ("string" , "" , nil )
249
+ typ , err := NewType ("string" , "" , nil )
250
+ if err != nil {
251
+ return "" , err
252
+ }
250
253
unpacked , err := (Arguments {{Type : typ }}).Unpack (data [4 :])
251
254
if err != nil {
252
255
return "" , err
Original file line number Diff line number Diff line change @@ -144,7 +144,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
144
144
Val []byte
145
145
Key []byte
146
146
}
147
- gob .NewDecoder (r ).Decode (& dec )
147
+ if err := gob .NewDecoder (r ).Decode (& dec ); err != nil {
148
+ return err
149
+ }
148
150
st .owner = dec .Owner
149
151
st .nodeType = dec .NodeType
150
152
st .val = dec .Val
@@ -158,7 +160,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
158
160
continue
159
161
}
160
162
var child StackTrie
161
- child .unmarshalBinary (r )
163
+ if err := child .unmarshalBinary (r ); err != nil {
164
+ return err
165
+ }
162
166
st .children [i ] = & child
163
167
}
164
168
return nil
You can’t perform that action at this time.
0 commit comments