Skip to content

Commit

Permalink
catch error on RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Stalmans committed May 1, 2017
1 parent 79cc37c commit fce766e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rpc-http/rpctransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ func EcDoRPCExt2(MAPI []byte, auxLen uint32) ([]byte, error) {
return dec[20:], err
}

if len(resp.PDU) < 28 {
utils.Error.Println(resp.PDU)
return nil, fmt.Errorf("Invalid response.")
}

return resp.PDU[28:], err
}

Expand Down

0 comments on commit fce766e

Please sign in to comment.