mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:50:28 +03:00
pytest: bind to localhost
Pointed out by CodeQL Fixes https://github.com/curl/curl/security/code-scanning/298 Closes #18506
This commit is contained in:
parent
82449d4d91
commit
61759a9843
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ def alloc_port_set(port_specs: Dict[str, int]) -> Dict[str, int]:
|
|||
for name, ptype in port_specs.items():
|
||||
try:
|
||||
s = socket.socket(type=ptype)
|
||||
s.bind(('', 0))
|
||||
s.bind(('127.0.0.1', 0))
|
||||
ports[name] = s.getsockname()[1]
|
||||
socks.append(s)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue