mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
native: do proper error handling when deserializing user data
This commit is contained in:
parent
fbe8bd2d9c
commit
4775b513f9
1 changed files with 5 additions and 3 deletions
|
@ -277,11 +277,13 @@ func (o *Oracle) FinishInternal(ic *interop.Context) error {
|
|||
}),
|
||||
})
|
||||
|
||||
r := io.NewBinReaderFromBuf(req.UserData)
|
||||
userData := stackitem.DecodeBinary(r)
|
||||
userData, err := stackitem.Deserialize(req.UserData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args := []stackitem.Item{
|
||||
stackitem.Make(req.URL),
|
||||
stackitem.Make(userData),
|
||||
userData,
|
||||
stackitem.Make(resp.Code),
|
||||
stackitem.Make(resp.Result),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue