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

Input validation #43

Open
siilike opened this issue Sep 15, 2019 · 1 comment
Open

Input validation #43

siilike opened this issue Sep 15, 2019 · 1 comment

Comments

@siilike
Copy link
Contributor

siilike commented Sep 15, 2019

I was wondering what would be the best way to perform input validation to avoid buffer overflows.

For instance, if the application receives a 10-byte message that is a binary VPack value with length set to 100 bytes.

@jsteemann
Copy link
Contributor

There is a class named velocypack::Validator, which can be used for input validation.
It has a validate method which should be given a pointer to the input plus the length of the input.
There are several examples of how to use it in the tests.

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

2 participants