Replace additional unsafe string functions

This commit is contained in:
Cameron Gutman committed 2023-10-06 17:33:37 -05:00
1 parent d055599608
commit 8b84d17c8d
7 files changed
+52 -14

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ int LiFindExternalAddressIP4(const char* stunServer, unsigned short stunPort, un
hints.ai_protocol = IPPROTO_UDP;
hints.ai_flags = AI_ADDRCONFIG;
sprintf(stunPortStr, "%u", stunPort);
snprintf(stunPortStr, sizeof(stunPortStr), "%u", stunPort);
err = getaddrinfo(stunServer, stunPortStr, &hints, &stunAddrs);
if (err != 0 || stunAddrs == NULL) {
Limelog("Failed to resolve STUN server: %d\n", err);