diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 16:19:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 16:19:57 +0000 |
commit | f485b5e4b683cc31168d440dc89574913e814852 (patch) | |
tree | 1d5e234805492a7e534d2edaddb2d4f3c75bdd77 /protocols/IcqOscarJ/src/changeinfo | |
parent | a30574fe4abb9065a8a67a6ce992ce11deef2564 (diff) |
all buffer lengths are of size_t now
git-svn-id: http://svn.miranda-ng.org/main/trunk@11173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/changeinfo')
-rw-r--r-- | protocols/IcqOscarJ/src/changeinfo/db.cpp | 3 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/changeinfo/dlgproc.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/changeinfo/editstring.cpp | 14 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/changeinfo/upload.cpp | 2 |
4 files changed, 10 insertions, 11 deletions
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;i<SIZEOF(escapes);i+=2)
if(str[1]==escapes[i])
{
*str=escapes[i+1];
- memmove(str+1,str+2,strlennull(str)-1);
+ memmove(str+1,str+2,mir_strlen(str)-1);
break;
}
}
@@ -93,8 +93,8 @@ static void EscapesToBinary(char *str) char *BinaryToEscapes(char *str)
{
- int extra=10,len=strlennull(str)+11,i;
- char *out,*pout;
+ int extra = 10, len = (int)mir_strlen(str) + 11, i;
+ char *out, *pout;
out=pout=(char*)SAFE_MALLOC(len);
for (;*str;str++)
@@ -310,9 +310,9 @@ void ChangeInfoData::EndStringEdit(int save) EscapesToBinary(text);
}
if ((si.displayType & LIF_PASSWORD && strcmpnull(text, " ")) ||
- (!(si.displayType & LIF_PASSWORD) && strcmpnull(text, (char*)sid.value) && (strlennull(text) + strlennull((char*)sid.value)))) {
+ (!(si.displayType & LIF_PASSWORD) && strcmpnull(text, (char*)sid.value) && (mir_strlen(text) + mir_strlen((char*)sid.value)))) {
SAFE_FREE((void**)&sid.value);
- if (strlennull(text))
+ if (mir_strlen(text))
sid.value = (LPARAM)text;
else {
sid.value = 0;
diff --git a/protocols/IcqOscarJ/src/changeinfo/upload.cpp b/protocols/IcqOscarJ/src/changeinfo/upload.cpp index 6ff49b54f3..c8c515c950 100644 --- a/protocols/IcqOscarJ/src/changeinfo/upload.cpp +++ b/protocols/IcqOscarJ/src/changeinfo/upload.cpp @@ -67,7 +67,7 @@ int ChangeInfoData::UploadSettings(void) //password
char* tmp = ppro->GetUserPassword(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
|