Skip to content

Commit 4f9b25c

Browse files
jpnurmiclaude
andcommitted
fix(transport): initialize body_path to NULL in prepare_http_request
SENTRY_MAKE uses malloc (not calloc), leaving body_path uninitialized. The curl/winhttp send functions then check `if (req->body_path)` which passes on garbage, causing a SEGV when dereferencing the pointer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4050cc0 commit 4f9b25c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/transports/sentry_http_transport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ sentry__prepare_http_request(sentry_envelope_t *envelope,
144144

145145
req->method = "POST";
146146
req->url = sentry__dsn_get_envelope_url(dsn);
147+
req->body_path = NULL;
147148

148149
sentry_prepared_http_header_t *h;
149150
h = &req->headers[req->headers_len++];

0 commit comments

Comments
 (0)