ioLibrary_Driver
ioLibrary_Driver copied to clipboard
Buffer overflow error in httpParser
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.