Fix potential string truncation error

This commit is contained in:
Chris Thrasher committed 2023-07-08 11:01:11 -06:00
1 parent d536b3d2cc
commit b63eddd4cd
3 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -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;
}