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

Ensure value is positive before casting size_t to uint64_t in calls to sxg_write_utf8_cbor_header #75

Open
twifkak opened this issue Jan 22, 2021 · 0 comments

Comments

@twifkak
Copy link
Collaborator

twifkak commented Jan 22, 2021

Looks like all the callers of sxg_write_map_cbor_header pass in a size_t. For defense-in-depth, it would be nice to add an if (value < 0) do_something_else(); before each one is cast to a uint64_t.

Low risk. This isn't a buffer overflow risk. Worst case is we serve an invalid SXG that the browser rejects due to CBOR parse error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant