op-geth/mobile
Elias Naur 23c6fcdbe8 mobile: don't retain transient []byte in CallMsg.SetData (#14804)
* mobile: don't retain transient []byte in CallMsg.SetData

Go mobile doesn't copy []byte parameters, for performance and to allow
writes to the byte array be reflected in the native byte array.
Unfortunately, that means []byte arguments are only valid during the
call it is being passed into.

CallMsg.SetData retains such a byte array. Copy it instead

Fixes #14675

* mobile: copy all []byte arguments from gomobile

To avoid subtle errors when accidentially retaining an otherwise
transient byte slice coming from gomobile, copy all byte slices before
use.

* mobile: replace copySlice with common.CopyBytes
2017-07-17 15:25:46 +03:00
..
accounts.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
android_test.go mobile: add a regression test for signer recovery 2017-06-13 13:39:39 +03:00
big.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
bind.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
common.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
context.go all: import "context" instead of "golang.org/x/net/context" 2017-03-22 20:49:15 +01:00
discover.go mobile: iOS naming and API fixes for generators and Swift (#3408) 2016-12-08 13:09:26 +01:00
doc.go mobile: Fix typo ( Ethereun -> Ethereum ) 2017-03-07 01:30:06 +01:00
ethclient.go core/vm: move Log to core/types 2017-01-06 14:15:22 +01:00
ethereum.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
geth.go whisperv5: integrate whisper and add whisper RPC simulator 2017-06-15 11:53:15 +02:00
geth_android.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
geth_ios.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
geth_other.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
init.go all: disable log message colors outside of geth 2017-02-27 15:33:12 +01:00
interface.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
logger.go all: disable log message colors outside of geth 2017-02-27 15:33:12 +01:00
p2p.go all: update license information 2017-04-14 10:29:00 +02:00
params.go consensus/clique: Proof of Authority (#3753) 2017-04-10 12:24:12 +02:00
primitives.go all: update license information 2017-04-14 10:29:00 +02:00
types.go mobile: don't retain transient []byte in CallMsg.SetData (#14804) 2017-07-17 15:25:46 +03:00
vm.go core/vm: move Log to core/types 2017-01-06 14:15:22 +01:00