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) {
246246 if ! bytes .Equal (data [:4 ], revertSelector ) {
247247 return "" , errors .New ("invalid data for unpacking" )
248248 }
249- typ , _ := NewType ("string" , "" , nil )
249+ typ , err := NewType ("string" , "" , nil )
250+ if err != nil {
251+ return "" , err
252+ }
250253 unpacked , err := (Arguments {{Type : typ }}).Unpack (data [4 :])
251254 if err != nil {
252255 return "" , err
Original file line number Diff line number Diff line change @@ -144,7 +144,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
144144 Val []byte
145145 Key []byte
146146 }
147- gob .NewDecoder (r ).Decode (& dec )
147+ if err := gob .NewDecoder (r ).Decode (& dec ); err != nil {
148+ return err
149+ }
148150 st .owner = dec .Owner
149151 st .nodeType = dec .NodeType
150152 st .val = dec .Val
@@ -158,7 +160,9 @@ func (st *StackTrie) unmarshalBinary(r io.Reader) error {
158160 continue
159161 }
160162 var child StackTrie
161- child .unmarshalBinary (r )
163+ if err := child .unmarshalBinary (r ); err != nil {
164+ return err
165+ }
162166 st .children [i ] = & child
163167 }
164168 return nil
You can’t perform that action at this time.
0 commit comments