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/New_GPG | |
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/New_GPG')
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 8 | ||||
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 6 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 872fa7b141..e282fe17b1 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -2246,8 +2246,8 @@ void InitCheck() ICQ_CUSTOMCAP cap; cap.cbSize = sizeof(ICQ_CUSTOMCAP); cap.hIcon = 0; - strncpy(cap.name, "GPG Key AutoExchange", MAX_CAPNAME); - strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); + mir_strncpy(cap.name, "GPG Key AutoExchange", MAX_CAPNAME); + mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); for(int i = 0; i < count; i++) if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY)) @@ -2261,8 +2261,8 @@ void InitCheck() ICQ_CUSTOMCAP cap; cap.cbSize = sizeof(ICQ_CUSTOMCAP); cap.hIcon = 0; - strncpy(cap.name, "GPG Encrypted FileTransfers", MAX_CAPNAME); - strncpy(cap.caps, "GPGFileTransfer", sizeof(cap.caps)); + mir_strncpy(cap.name, "GPG Encrypted FileTransfers", MAX_CAPNAME); + mir_strncpy(cap.caps, "GPGFileTransfer", sizeof(cap.caps)); for(int i = 0; i < count; i++) if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY)) diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 3c6f993507..5cd4560bf6 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -538,7 +538,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) if(uin) { if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) { ICQ_CUSTOMCAP cap = {0}; - strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); + mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); if(ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) { CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; @@ -835,7 +835,7 @@ int HookSendMsg(WPARAM w, LPARAM l) if(bDebugLog) debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))); ICQ_CUSTOMCAP cap = {0}; - strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); + mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) { if(bDebugLog) debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))); @@ -917,7 +917,7 @@ int HookSendMsg(WPARAM w, LPARAM l) if(!(dbei->flags & DBEF_SENT) && db_mc_isMeta((MCONTACT)w)) { char tmp[29]; - strncpy(tmp, (char*)dbei->pBlob, 27); + mir_strncpy(tmp, (char*)dbei->pBlob, 27); tmp[28] = '\0'; if(strstr(tmp, "-----BEGIN PGP MESSAGE-----")) { diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index a4d4077ac8..55cc45a1a2 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -544,7 +544,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) { supported_proto = true; ICQ_CUSTOMCAP cap = {0}; - strncpy(cap.caps, "GPGFileTransfer",sizeof(cap.caps)); + mir_strncpy(cap.caps, "GPGFileTransfer",sizeof(cap.caps)); if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) cap_found = true; } |