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

Call to strncat_s missing arg? #40

Open woollybah opened 6 years ago

woollybah commented 6 years ago

Platform : Win32, x64, MinGW 7.2

You seem to be missing a dest size argument here : https://github.com/SLikeSoft/SLikeNet/blob/70a86d11b7595b6ac64bdd261ce440ff35ad4a64/Source/src/TelnetTransport.cpp#L96

Luke1410 commented 6 years ago

Not quite. text is a char array with a fixed size (REMOTE_MAX_TEXT_INPUT) (ln 75). Therefore, the templated version of strncat_s() is used and the size of the destination buffer doesn't need to be specified as another argument by the caller.

Please note that we don't test explicitly on MinGW atm. Adding support is on our mid-term roadmap (internal case number: SLNET-237). Do you suggest that the code line there triggers a compile error atm with MinGW?