← Commit list

8d4530537a

x2018
x2018
2025-11-04
SUCCESS Duration: 141s

Subject

gtls: check the return value of gnutls_pubkey_init()

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/gtls.c+4 -2
@@ -1291,8 +1291,10 @@ static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
do {
int ret;
- /* Begin Gyrations to get the public key */
- gnutls_pubkey_init(&key);
+ /* Begin Gyrations to get the public key */
+ ret = gnutls_pubkey_init(&key);
+ if(ret < 0)
+ break; /* failed */
ret = gnutls_pubkey_import_x509(key, cert, 0);
if(ret < 0)