Skip to content

Store the connection and url parameters in std::string #1571

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

Conversation

majordaw
Copy link
Contributor

Passing stack allocated strings to the Transaction object could lead to memory corruption when the Transaction object outlive the stack. In this case the m_clientIpAddress, m_serverIpAddress, m_httpVersion and the m_uri pointers will point to invalid addresses.
I bumped into this when I made a transaction cache and one of my thread initialized the transactions (did the request phases) and a other finalized them (response phases, logging, free).

@zimmerle
Copy link
Contributor

Merged! thanks ;)

@zimmerle zimmerle closed this Sep 29, 2017
@zimmerle zimmerle self-requested a review September 29, 2017 16:31
@zimmerle zimmerle self-assigned this Sep 29, 2017
zimmerle pushed a commit that referenced this pull request Sep 29, 2017
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

Successfully merging this pull request may close these issues.

2 participants