Closed marco709394 closed 6 years ago
So this can 'fail' if the sender wants to send a 64-bit int and the receiver only has 32-bit int. It will probably just ignore the too-big value. But this might have consequences.
[]int
-encoding (but then we should take away the int
, too)protobuf.INTS_ARE_BAD
is not set to 0 and we're encountering an int
or []int
.So this can 'fail' if the sender wants to send a 64-bit int and the receiver only has 32-bit int. It will probably just ignore the too-big value.
Are sure? On first sight it doesn't seem so.
I mean, int
will always be encoded as int64
here or not: https://github.com/dedis/protobuf/pull/28/files#diff-e214241880c7c5dc058ccee5f600a351R290
OK, I see the problem you described above @ineiti ...
My opinion might be buried in this comment: https://github.com/dedis/protobuf/pull/28#discussion_r70075003
For simplicity, just use the following:
we write a test on the receiver side to see if the int is too big and fail if it is
Done in #42
Encode int element as int64