The latest PR (#283) introduced a bug that as the title described. So multidimensional byte slices/arrays will be marshalled to empty bytes.
I wrote a testcase
func TestMultidimensionalByteSlice(t *testing.T) {
arr := [2][2]byte{
[2]byte{1, 2},
[2]byte{3, 4}}
bz, err := cdc.MarshalBinaryBare(arr)
assert.NoError(t, err)
t.Log(bz)
var a [][]byte
cdc.UnmarshalBinaryBare(bz,&a)
t.Log(a)
}
the result is
=== RUN TestMultidimensionalByteSlice
--- PASS: TestMultidimensionalByteSlice (0.00s)
proto3_compat_test.go:136: [10]
proto3_compat_test.go:139: []
PASS
BTW, I submitted a report to the hackerone bug bounty program, but the response is not very timely, So I create an issue here.
The latest PR (#283) introduced a bug that as the title described. So multidimensional byte slices/arrays will be marshalled to empty bytes.
I wrote a testcase
the result is
BTW, I submitted a report to the hackerone bug bounty program, but the response is not very timely, So I create an issue here.