Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Conversation

@mikeliaohm
Copy link

  • Fix 3rd argument in memcpy to only copy the response string length or up to kMaxBufferSize.
  • Make sure raw_response->buffer is always null terminated.

@trungams
Copy link
Owner

trungams commented Mar 8, 2023

Thank you for making this PR. The first change to fix memcpy's issue is good, but the second change about null termination makes me realize that a server's response could be truncated by this implementation of a fixed buffer, which is an unwanted behaviour. It's been a while since I wrote this code and I may have forgotten a few things about the requirements for an HTTP server. I'll do some research and get back to you on the change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants