Commit c9fdd8a28a for openssl.org
commit c9fdd8a28aef003ea6fa3c561ac821a5f9e965fb
Author: andrei2308 <andrei2308cht@proton.me>
Date: Wed Apr 15 18:23:58 2026 +0300
Add check for empty server host in http_lib.c
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)
diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c
index 2821c0ec52..122dcfb107 100644
--- a/crypto/http/http_lib.c
+++ b/crypto/http/http_lib.c
@@ -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