Use binary.Size instead of unsafe.Sizeof
slimsag opened this issue · 0 comments
slimsag commented
There are many cases in the decoder where we utilize unsafe.Sizeof
to get the size in bytes of e.g. a struct. All of these cases should be replaced with binary.Size
instead. unsafe.Sizeof
is unsafe because it includes padding on struct members etc.