]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_ntlm: protect against null deref
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Jun 2025 07:33:04 +0000 (09:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Jun 2025 08:15:32 +0000 (10:15 +0200)
Closes #17585

lib/http_ntlm.c

index 6d1672bc633fafb35b88cc832db970d7f4ef4586..8c2ff40480103db977dd820f8b1a61c0bf67aa35 100644 (file)
@@ -168,6 +168,8 @@ CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
     authp = &data->state.authhost;
   }
   ntlm = Curl_auth_ntlm_get(conn, proxy);
+  if(!ntlm)
+    return CURLE_OUT_OF_MEMORY;
   authp->done = FALSE;
 
   /* not set means empty */