mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Fix potential string truncation error
This commit is contained in:
1 parent
d536b3d2cc
commit
b63eddd4cd
3 files changed
+11
-5
No files matched your search
@@ -75,7 +75,7 @@ sfIpAddress sfTcpSocket_getRemoteAddress(const sfTcpSocket* socket)
|
||||
CSFML_CHECK_RETURN(socket, result);
|
||||
|
||||
sf::IpAddress address = socket->This.getRemoteAddress();
|
||||
strncpy(result.address, address.toString().c_str(), 16);
|
||||
strncpy(result.address, address.toString().c_str(), 15);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user