You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a seg fault after registering a new uri. The issue seems to related to memcpy of response_string. I think the 3rd argument should be the size of the response string to be copied instead of kMaxBufferSize, or whichever is smaller.
Hi Mike, thank you for your interest in the repo, and thank you for your help identifying this bug. The previous code was using strncpy to copy the response content, but its behaviour is a bit different from memcpy, so we end up with the issue you described. I'll make a fix, or you can also submit a pull request if you want.
Hi, thank you for the great work.
I've encountered a seg fault after registering a new uri. The issue seems to related to
memcpy
ofresponse_string
. I think the 3rd argument should be the size of the response string to be copied instead ofkMaxBufferSize
, or whichever is smaller.http-server/src/http_server.cc
Lines 238 to 242 in 1c17136
this is a potential fix.
I've forked the project to reproduce my error at this repo.
The text was updated successfully, but these errors were encountered: