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

Fix segfault from my last SNI changes #1173

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

DimitriPapadopoulos
Copy link
Collaborator

Deal with sni the same way as gateway_host

  • Use the same maximum length GATEWAY_HOST_SIZE.
  • Handle sni as a fixed-length array instead of a pointer to dynamically allocated memory. Fix the current segfault in the process, which can be explained by improper handling of the allocated memory in merge_config(), where we would try to merge fixed-size arrays instead of pointers to allocated memory. Now we try to merge fixed-size arrays everywhere.

src/main.c Fixed Show fixed Hide fixed
- Use the same maximum length `GATEWAY_HOST_SIZE`.
- Handle `sni` as a fixed-length array instead of a pointer to
  dynamically allocated memory. Fix the current segfault in the process,
  which can be explained by improper handling of the allocated memory in
  `merge_config()`, where we would try to merge fixed-size arrays instead
  of pointers to allocated memory. Now we handle fixed-size arrays
  everywhere.
@DimitriPapadopoulos DimitriPapadopoulos merged commit bf94c2f into adrienverge:master Nov 22, 2023
5 checks passed
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.

1 participant