From 6fcfba2c46a456677b5825a899469ba4e8905448 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 May 2015 17:49:58 +0000 Subject: replace strncpy to mir_strncpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/client.cpp | 2 +- protocols/Xfire/src/main.cpp | 4 ++-- protocols/Xfire/src/searching4games.cpp | 2 +- protocols/Xfire/src/services.cpp | 2 +- protocols/Xfire/src/tools.cpp | 2 +- protocols/Xfire/src/variables.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/Xfire/src') diff --git a/protocols/Xfire/src/client.cpp b/protocols/Xfire/src/client.cpp index 024cfc16d9..4e0e7d1321 100644 --- a/protocols/Xfire/src/client.cpp +++ b/protocols/Xfire/src/client.cpp @@ -92,7 +92,7 @@ using namespace std; struct sockaddr_in sa; int iLen = sizeof(sa); getsockname(socket->m_sock, (SOCKADDR*)&sa, &iLen); - strncpy(this->localaddr,inet_ntoa(sa.sin_addr), sizeof(this->localaddr)-1); + mir_strncpy(this->localaddr,inet_ntoa(sa.sin_addr), sizeof(this->localaddr)-1); this->llocaladdr=inet_addr(this->localaddr); packetReader->setSocket(socket); diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 0978600aaf..c6509ee017 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -2833,7 +2833,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc GameServerQuery_query gsqq = { 0 }; gsqq.port = gameob->port; gsqq.xfiregameid = entry->game; - strncpy(gsqq.ip, temp, SIZEOF(gsqq.ip)-1); + mir_strncpy(gsqq.ip, temp, SIZEOF(gsqq.ip)-1); CallService("GameServerQuery/Query", (WPARAM)entry, (LPARAM)&gsqq); } } @@ -3395,7 +3395,7 @@ INT_PTR GetAvatarInfo(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; if (!db_get(pai->hContact, "ContactPhoto", "File", &dbv)) { - strncpy(pai->filename, dbv.pszVal, sizeof(pai->filename)-1); + mir_strncpy(pai->filename, dbv.pszVal, sizeof(pai->filename)-1); db_free(&dbv); } else diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp index 01fb52f082..81bd3e9427 100644 --- a/protocols/Xfire/src/searching4games.cpp +++ b/protocols/Xfire/src/searching4games.cpp @@ -67,7 +67,7 @@ BOOL CheckPath(char*ppath, char*pathwildcard = NULL) { char temp[XFIRE_MAX_STATIC_STRING_LEN]; - strncpy(temp, ppath,XFIRE_MAX_STATIC_STRING_LEN-1); + mir_strncpy(temp, ppath,XFIRE_MAX_STATIC_STRING_LEN-1); *(temp + mir_strlen(temp) - 1) = 0; mir_strncat(temp, wfd.cFileName, SIZEOF(temp) - mir_strlen(temp)); mir_strncat(temp, "\\", SIZEOF(temp) - mir_strlen(temp)); diff --git a/protocols/Xfire/src/services.cpp b/protocols/Xfire/src/services.cpp index 380308cc14..2955dc85fc 100644 --- a/protocols/Xfire/src/services.cpp +++ b/protocols/Xfire/src/services.cpp @@ -58,7 +58,7 @@ INT_PTR GetMyAvatar(WPARAM wparam, LPARAM lparam) { if (!db_get(NULL, protocolname, "MyAvatarFile", &dbv)) { - strncpy((char*)wparam, dbv.pszVal, (int)lparam); + mir_strncpy((char*)wparam, dbv.pszVal, (int)lparam); db_free(&dbv); return 0; } diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp index 05658e1ac8..0b4ccc956d 100644 --- a/protocols/Xfire/src/tools.cpp +++ b/protocols/Xfire/src/tools.cpp @@ -211,7 +211,7 @@ char* GetLaunchPath(char*launch) if (launch == NULL) return temp; - strncpy(temp, launch, XFIRE_MAX_STATIC_STRING_LEN -1); + mir_strncpy(temp, launch, XFIRE_MAX_STATIC_STRING_LEN -1); while (*p != 0 && *f != 0) { diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp index 70f167e933..dd1d038f30 100644 --- a/protocols/Xfire/src/variables.cpp +++ b/protocols/Xfire/src/variables.cpp @@ -23,7 +23,7 @@ char* Varxfiregame(ARGUMENTSINFO *ai) DBVARIANT dbv3; if (!db_get(ai->fi->hContact, protocolname, "RGame", &dbv3)) { - strncpy(temp, dbv3.pszVal, 255); + mir_strncpy(temp, dbv3.pszVal, 255); db_free(&dbv3); return mir_strdup(temp); } -- cgit v1.2.3