mirror of
https://github.com/webmin/webmin.git
synced 2026-06-23 20:40:32 +01:00
Fix test for ports below zero and put port number to error message
This commit is contained in:
@@ -349,8 +349,8 @@ if ($fh6) {
|
||||
}
|
||||
while(1) {
|
||||
$$port++;
|
||||
if ($$port >= 65536) {
|
||||
return "Failed to allocate a free port!";
|
||||
if ($$port < 0 || $$port > 65535) {
|
||||
return "Failed to allocate a free port number: $port";
|
||||
}
|
||||
$pack = pack_sockaddr_in($$port, INADDR_ANY);
|
||||
next if (!bind($fh, $pack));
|
||||
|
||||
Reference in New Issue
Block a user