diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
commit | 6fcfba2c46a456677b5825a899469ba4e8905448 (patch) | |
tree | b4b6f6f9001b8609998a815ec1c7c92aa30b287e /plugins/YahooGroups/src | |
parent | 24bed968f1e96aa4598d8dbe3a6e8a34dded3dc2 (diff) |
replace strncpy to mir_strncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YahooGroups/src')
-rw-r--r-- | plugins/YahooGroups/src/utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index f13cc4ee2d..a8e3742819 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -117,7 +117,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) {
char buffer[32] = {0};
mir_strcpy(buffer, "0x");
- strncpy(buffer + 2, inData, HEX_SIZE);
+ mir_strncpy(buffer + 2, inData, HEX_SIZE);
sscanf(buffer, "%x", &size);
outData = (unsigned char*)new char[size*2];
UINT i;
@@ -126,7 +126,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) buffer[4] = '\0'; //mark the end of the string
for (i = 0; i < size; i++)
{
- strncpy(buffer + 2, &tmp[i * 2], 2);
+ mir_strncpy(buffer + 2, &tmp[i * 2], 2);
sscanf(buffer, "%x", &outData[i]);
}
i = size;
@@ -143,7 +143,7 @@ int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName res = 0;
int tmp = (int)mir_strlen(dbv.pszVal);
len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, dbv.pszVal, len);
+ mir_strncpy(szResult, dbv.pszVal, len);
szResult[len] = '\0';
mir_free(dbv.pszVal);
}
@@ -153,7 +153,7 @@ int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName {
int tmp = (int)mir_strlen(szError);
len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, szError, len);
+ mir_strncpy(szResult, szError, len);
szResult[len] = '\0';
}
else{
|