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

Buffer overflow error in httpParser #135

Open
jarred-aos opened this issue Jun 4, 2023 · 0 comments
Open

Buffer overflow error in httpParser #135

jarred-aos opened this issue Jun 4, 2023 · 0 comments

Comments

@jarred-aos
Copy link

When sending large data to the get_http_param_value function in httpParser, there is no check for if the length of the parameter value is larger than the buffer created in ret[BUFPUB]. This can result in buffer overruns when the data is copied to the buffer with strncpy.

A short term solution is to change

if(len)

to

if(len && len <= sizeof(BUFPUB))

on line 233.

However, this just fails to parse the data correctly and doesn't return an error message to the user.

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