← Commit list

ba685ad5e5

Viktor Szakats
Viktor Szakats
2026-02-24
SUCCESS Duration: 328s

Subject

openssl: fix potential NULL dereference when loading certs (Windows)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/openssl.c+2 -2
@@ -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) {