Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set length of array before casting #2

Open
gavin-norman-sociomantic opened this issue Sep 7, 2017 · 0 comments
Open

Set length of array before casting #2

gavin-norman-sociomantic opened this issue Sep 7, 2017 · 0 comments
Labels

Comments

david-eckardt-sociomantic added a commit to david-eckardt-sociomantic/dmqproto that referenced this issue Feb 2, 2018
Fixes sociomantic-tsunami#2.

- Use `VoidBufferAsArrayOf!(cstring)` instead of `cast(cstring[]*)`, which
  is dangerous because the array length is set after the cast.
- Set the array length once instead of appending incrementally.
- Use `parseBody` to parse the value to enforce it is the last field in the
  message payload.
gavin-norman-sociomantic pushed a commit that referenced this issue Feb 2, 2018
Fixes #2.

- Use `VoidBufferAsArrayOf!(cstring)` instead of `cast(cstring[]*)`, which
  is dangerous because the array length is set after the cast.
- Set the array length once instead of appending incrementally.
- Use `parseBody` to parse the value to enforce it is the last field in the
  message payload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant