rustls: verify that verifier_builder is not NULL

Since this function returns allocated resources there is probably at
least a theoretical risk this can return NULL.

Pointed out by ZeroPath

Closes #19756
This commit is contained in:
Daniel Stenberg 2025-11-28 23:59:23 +01:00
parent 545f2f387d
commit db32c0721f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -750,6 +750,10 @@ init_config_builder_verifier(struct Curl_easy *data,
}
verifier_builder = rustls_web_pki_server_cert_verifier_builder_new(roots);
if(!verifier_builder) {
result = CURLE_OUT_OF_MEMORY;
goto cleanup;
}
if(conn_config->CRLfile) {
result = init_config_builder_verifier_crl(data,