velocypack icon indicating copy to clipboard operation
velocypack copied to clipboard

Input validation

Open siilike opened this issue 6 years ago • 1 comments

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.

siilike avatar Sep 15 '19 08:09 siilike

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.

jsteemann avatar Sep 16 '19 08:09 jsteemann