You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we should never silently zero-fill, and neither should we do whatever it is we do right now.
What should happen is, if we don't write sizeOf(type) bytes in the write function, we should blow up hard. This should probably be added in the general write logic, because it's not specific to array or anything.
If you have an array with a fixed number for the count.
And you serialize less elements than the count.
Then the buffer should probably zero fill to look like this.
<Buffer 01 00 00 00 02 00 00 00 00 00 00 00>
Or have an error.
Currently it looks like this.
<Buffer 01 00 00 00 02 00 00 00>
Yet if I go over 3 values like so.
It actually over-flows the space in which I would expect it to be allowed to write in.
<Buffer 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00>
Then the parsing would be wrong, because the extra data would not be for the same packet.
I guess this is really two concerns.
The text was updated successfully, but these errors were encountered: