]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add check for empty server host in http_lib.c
authorandrei2308 <andrei2308cht@proton.me>
Wed, 15 Apr 2026 15:23:58 +0000 (18:23 +0300)
committerTomas Mraz <tomas@openssl.foundation>
Wed, 29 Apr 2026 15:25:22 +0000 (17:25 +0200)
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
MergeDate: Wed Apr 29 15:25:32 2026
(Merged from https://github.com/openssl/openssl/pull/30848)

crypto/http/http_lib.c

index 2821c0ec528d906b4745f44f64ca2826b12d6458..122dcfb1074665487fa77e29d111ee9759160760 100644 (file)
@@ -271,6 +271,9 @@ static int use_proxy(const char *no_proxy, const char *server)
         server = host;
     }
 
+    if (sl == 0)
+        return 1;
+
     /*
      * using environment variable names, both lowercase and uppercase variants,
      * compatible with other HTTP client implementations like wget, curl and git