rustls: typecast variable for safer trace output

This is a variadic function call with a mismatched argument type; on
platforms where uintptr_t and size_t differ, this invokes undefined
behavior.

Reported in Joshua's sarif data

Closes #18628
This commit is contained in:
Daniel Stenberg 2025-09-20 11:17:48 +02:00
parent 0209e087c6
commit 2fe95cb0e3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -121,7 +121,7 @@ read_cb(void *userdata, uint8_t *buf, uintptr_t len, uintptr_t *out_n)
connssl->peer_closed = TRUE;
*out_n = (uintptr_t)nread;
CURL_TRC_CF(io_ctx->data, io_ctx->cf, "cf->next recv(len=%zu) -> %d, %zu",
len, result, nread);
(size_t)len, result, nread);
return ret;
}