Skip to content

Commit

Permalink
fix: increase curl headers buffer size to 512 (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnicolaescu authored Jan 9, 2023
1 parent ed0a62d commit 1f27ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 1f27ce5

Please sign in to comment.