Skip to content

Port numbers with 5+ digits get truncated #376

@jimmy-mcelwain

Description

@jimmy-mcelwain

See #374 (reply in thread)

Port numbers with 5 or more digits get truncated when trying to connect.

If I have a valid port in the config file 16510, I would have to connect to 1651 on the docker side. If I specify port 88888 in the config file (I am aware that this is not a valid port), then I can still connect properly if I specify port 8888 when I start the docker container.

This is a problem if a user puts a valid 5 digit port number in the config file.

That is caused by this line upstream here. MAX_PORT_LEN is set to 5, but in reality snprintf is truncating at 4 so it has space to put the null character. I haven't looked anywhere yet to see if this is an intentional design choice, but I doubt that it is. I can look more into it soon.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions