mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
Fix off-by-one range checks for TCP port numbers
Port numbers should be in the range [0,65535] not [0,65536]. It
looks like the check was changed from 65535 to 65536 in commit
89b9a561ea.
This commit is contained in:
parent
2779b16b95
commit
6b103ae6d3
1 changed files with 2 additions and 2 deletions
|
|
@ -277,7 +277,7 @@ si_open_client_stream(cl_object host, cl_object port)
|
|||
|
||||
if (ecl_unlikely(!ECL_FIXNUMP(port) ||
|
||||
ecl_fixnum_minusp(port) ||
|
||||
ecl_fixnum_greater(port,ecl_make_fixnum(65536)))) {
|
||||
ecl_fixnum_greater(port,ecl_make_fixnum(65535)))) {
|
||||
FEwrong_type_nth_arg(@[si::open-client-stream], 2, port,
|
||||
ecl_read_from_cstring("(INTEGER 0 65535)"));
|
||||
}
|
||||
|
|
@ -311,7 +311,7 @@ si_open_server_stream(cl_object port)
|
|||
|
||||
if (ecl_unlikely(!ECL_FIXNUMP(port) ||
|
||||
ecl_fixnum_minusp(port) ||
|
||||
ecl_fixnum_greater(port,ecl_make_fixnum(65536)))) {
|
||||
ecl_fixnum_greater(port,ecl_make_fixnum(65535)))) {
|
||||
FEwrong_type_only_arg(@[si::open-client-stream], port,
|
||||
ecl_read_from_cstring("(INTEGER 0 65535)"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue