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: increase curl headers buffer size to 512 #784

Merged
merged 2 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Fixes**:

- Better error messages in `sentry_transport_curl`. ([#777](https://github.com/getsentry/sentry-native/pull/777))
- Increased curl headers buffer size to 512 (in `sentry_transport_curl`). ([#784](https://github.com/getsentry/sentry-native/pull/784))

**Internal**:

Expand All @@ -30,7 +31,7 @@
**Internal**:

- Updated Breakpad and Crashpad backends to 2022-10-17. ([#765](https://github.com/getsentry/sentry-native/pull/765))

**Thank you**:

Features, fixes and improvements in this release have been contributed by:
Expand Down Expand Up @@ -650,6 +651,7 @@ See [#220](https://github.com/getsentry/sentry-native/issues/220) for details.
This function now takes a pointer to the new `sentry_transport_t` type.
Migrating from the old API can be done by wrapping with
`sentry_new_function_transport`, like this:

```c
sentry_options_set_transport(
options, sentry_new_function_transport(send_envelope_func, &closure_data));
Expand Down
2 changes: 1 addition & 1 deletion src/transports/sentry_transport_curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ sentry__curl_send_task(void *_envelope, void *_state)
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "expect:");
for (size_t i = 0; i < req->headers_len; i++) {
char buf[255];
char buf[512];
size_t written = (size_t)snprintf(buf, sizeof(buf), "%s:%s",
req->headers[i].key, req->headers[i].value);
if (written >= sizeof(buf)) {
Expand Down