openssl: fix potential NULL dereference when loading certs (Windows)
No binary (build failed)
—
(log yok)
| @@ -2917,8 +2917,8 @@ static CURLcode ossl_win_load_store(struct Curl_easy *data, | |
| * depending on what is found. For more details see | |
| * CertGetEnhancedKeyUsage doc. | |
| */ | |
| - | if(CertGetEnhancedKeyUsage(pContext, 0, NULL, &req_size)) { |
| - | if(req_size && req_size > enhkey_usage_size) { |
| + | if(CertGetEnhancedKeyUsage(pContext, 0, NULL, &req_size) && req_size) { |
| + | if(req_size > enhkey_usage_size) { |
| void *tmp = curlx_realloc(enhkey_usage, req_size); | |
| if(!tmp) { | |