mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 03:33:11 -08:00
Restrict further the port range (as specified by open standards)
This commit is contained in:
parent
ce3489a846
commit
899e7ba66b
1 changed files with 4 additions and 3 deletions
|
|
@ -269,8 +269,7 @@ si_open_client_stream(cl_object host, cl_object port)
|
|||
/* Ensure "host" is a string that we can pass to a C function */
|
||||
host = si_copy_to_simple_base_string(host);
|
||||
|
||||
/* The port number is not negative */
|
||||
p = fixnnint(port);
|
||||
p = ecl_fixnum_in_range(@'si::open-client-stream',"port",port,0,65535);
|
||||
|
||||
if (host->base_string.fillp > BUFSIZ - 1)
|
||||
FEerror("~S is a too long file name.", 1, host);
|
||||
|
|
@ -295,10 +294,12 @@ cl_object
|
|||
si_open_server_stream(cl_object port)
|
||||
{
|
||||
int fd; /* file descriptor */
|
||||
cl_index p;
|
||||
cl_object output;
|
||||
|
||||
start_critical_section();
|
||||
fd = create_server_port(fixnnint(port));
|
||||
p = ecl_fixnum_in_range(@'si::open-client-stream',"port",port,0,65535);
|
||||
fd = create_server_port(p);
|
||||
end_critical_section();
|
||||
|
||||
if (fd == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue