SLikeSoft / SLikeNet

SLikeNetâ„¢ is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development.
https://www.slikenet.com/
Other
401 stars 63 forks source link

SystemAddress FromString for localhost:port #46

Closed Tomash667 closed 5 years ago

Tomash667 commented 5 years ago

When using SystemAddress FromString like that:

SystemAddress adr;
adr.FromString("localhost:123", ':');

it will ignore port unless it's written like that "localhost123". There is no delimiter checking.

Possible fix: https://github.com/Tomash667/SLikeNet/commit/2701b19857f1d43550ae35f93b9d5acbdf1cd0ad

Luke1410 commented 5 years ago

Thanks for the report Tomash667 and sorry for the delay in getting back to that. There are quite a few mishaps on that part of the code. We are currently revising that entire part and will have it resolved in a few hours.

Note that the patch you are suggesting only handles the case when using IPv4-only mode. The same issue however also exists in IPv6 mode in which case your fix won't suffice.

Internal case number: SLNET-263

Luke1410 commented 5 years ago

The issue and multiple related ones have been resolved now. The fixes will be shipped with the upcoming version of SLikeNet.

Luke1410 commented 5 years ago

SLikeNet 0.1.3 was released now (on 2019-08-23) which contains the fixes for this issue.