mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-28 16:54:32 +00:00
Replace additional unsafe string functions
This commit is contained in:
1 parent
d055599608
commit
8b84d17c8d
7 files changed
+52
-14
No files matched your search
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user