From f485b5e4b683cc31168d440dc89574913e814852 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 16:19:57 +0000 Subject: all buffer lengths are of size_t now git-svn-id: http://svn.miranda-ng.org/main/trunk@11173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/changeinfo/db.cpp | 3 +-- protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp | 2 +- protocols/IcqOscarJ/src/changeinfo/editstring.cpp | 14 +++++++------- protocols/IcqOscarJ/src/changeinfo/upload.cpp | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'protocols/IcqOscarJ/src/changeinfo') diff --git a/protocols/IcqOscarJ/src/changeinfo/db.cpp b/protocols/IcqOscarJ/src/changeinfo/db.cpp index 31f88db502..d4d8d6881c 100644 --- a/protocols/IcqOscarJ/src/changeinfo/db.cpp +++ b/protocols/IcqOscarJ/src/changeinfo/db.cpp @@ -179,8 +179,7 @@ int ChangeInfoData::SaveSettingsToDb(HWND hwndDlg) switch (si.dbType) { case DBVT_ASCIIZ: if (si.displayType & LIF_PASSWORD) { - int nSettingLen = strlennull((char*)sid.value); - + size_t nSettingLen = mir_strlen((char*)sid.value); if (nSettingLen > 8 || nSettingLen < 1) { MessageBox(hwndDlg, TranslateT("The ICQ server does not support passwords longer than 8 characters. Please use a shorter password."), TranslateT("Change ICQ Details"), MB_OK); ret = 0; diff --git a/protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp b/protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp index 0edfa48fcb..dff436cf78 100644 --- a/protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp +++ b/protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp @@ -36,7 +36,7 @@ static int DrawTextUtf(HDC hDC, char *text, LPRECT lpRect, UINT uFormat, LPSIZE WCHAR *tmp = make_unicode_string(text); res = DrawTextW(hDC, tmp, -1, lpRect, uFormat); if (lpSize) - GetTextExtentPoint32W(hDC, tmp, strlennull(tmp), lpSize); + GetTextExtentPoint32W(hDC, tmp, (int)mir_wstrlen(tmp), lpSize); SAFE_FREE((void**)&tmp); return res; diff --git a/protocols/IcqOscarJ/src/changeinfo/editstring.cpp b/protocols/IcqOscarJ/src/changeinfo/editstring.cpp index 19fdd4c2b7..528f73eaea 100644 --- a/protocols/IcqOscarJ/src/changeinfo/editstring.cpp +++ b/protocols/IcqOscarJ/src/changeinfo/editstring.cpp @@ -55,7 +55,7 @@ static void EscapesToMultiline(WCHAR *str,PDWORD selStart,PDWORD selEnd) else if (str[1] == 't') { *str = '\t'; - memmove(str+1, str+2, sizeof(WCHAR)*(strlennull(str)-1)); + memmove(str+1, str+2, sizeof(WCHAR)*(mir_wstrlen(str)-1)); if (*selStart>i) --*selStart; if (*selEnd>i) --*selEnd; @@ -76,14 +76,14 @@ static void EscapesToBinary(char *str) char *codeend; *str=(char)strtol(str+1,&codeend,8); if (*str==0) {*str='\\'; continue;} - memmove(str+1,codeend,strlennull(codeend)+1); + memmove(str+1,codeend,mir_strlen(codeend)+1); continue; } for(int i=0;iGetUserPassword(TRUE); if (tmp) { - if (strlennull(Password) > 0 && strcmpnull(Password, tmp)) { + if (mir_strlen(Password) > 0 && strcmpnull(Password, tmp)) { // update password in user info dialog (still open) strcpy(Password, tmp); // update password in protocol -- cgit v1.2.3