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

http: fixes memleak, segv and hostname check for http_cli and http_reqconn #37

Merged
merged 4 commits into from
Oct 25, 2020

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Oct 23, 2020

  • Fixes segfault if http_reqconn_send() is called with NULL parameter.
  • Activates hostname check for http_cli in general.
  • Enables parallel HTTPS requests.

@cspiel1 cspiel1 marked this pull request as draft October 23, 2020 05:50
@cspiel1 cspiel1 force-pushed the http_reqconn_segfault branch from 638fe33 to 75875f7 Compare October 23, 2020 14:40
The host name still can be overwritten by http_client_set_tls_hostname(). But
if not set the host name of the HTTP request should be used for the
validation.
Removes code lines that break parallel requests with one http_cli instance.
@cspiel1 cspiel1 force-pushed the http_reqconn_segfault branch from 75875f7 to 65f0af3 Compare October 23, 2020 16:12
@cspiel1 cspiel1 marked this pull request as ready for review October 23, 2020 16:13
@cspiel1 cspiel1 marked this pull request as draft October 23, 2020 17:40
This fixes memleak if the program terminates before the HTTP response was
received. Anyway, using http_reqconn after dereferencing the client makes no
sense.
@cspiel1 cspiel1 marked this pull request as ready for review October 23, 2020 18:33
@alfredh
Copy link
Contributor

alfredh commented Oct 24, 2020

looks fine to me.

@cspiel1 cspiel1 changed the title http: parameter NULL check for http_reqconn_send() http: fixes memleak, segv and hostname check for http_cli and http_reqconn Oct 25, 2020
@sreimers sreimers merged commit 508e5dc into baresip:master Oct 25, 2020
@cspiel1 cspiel1 deleted the http_reqconn_segfault branch December 7, 2020 09:30
@sreimers sreimers added the bug Something isn't working label Apr 9, 2021
@sreimers sreimers added this to the v2.0.0 milestone Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants