From 01de930753fd7a5d47c0350a4361949d770b93cf Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 22 Jul 2013 13:38:03 +0000 Subject: replace sprintf to mir_snprintf (part 1) git-svn-id: http://svn.miranda-ng.org/main/trunk@5446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AssocMgr/src/reg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/AssocMgr/src') diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index fc5803d7e1..539f2392f9 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -102,7 +102,7 @@ char *MakeFileClassName(const char *pszFileExt) pszClass=(char*)mir_alloc((lstrlenA(pszFileExt)+12)*sizeof(TCHAR)); if (pszClass!=NULL) /* using correctly formated PROGID */ - wsprintfA(pszClass,"miranda%sfile",pszFileExt); /* includes dot, buffer safe */ + mir_snprintf(pszClass, strlen(pszClass), "miranda%sfile", pszFileExt); /* includes dot, buffer safe */ return pszClass; } @@ -204,7 +204,7 @@ TCHAR *MakeIconLocation(HMODULE hModule,WORD nIconResID) if ((cch=GetModuleFileName(hModule,szModule,SIZEOF(szModule)))!=0) { pszIconLoc=(TCHAR*)mir_alloc((cch+=8)*sizeof(TCHAR)); if (pszIconLoc!=NULL) - wsprintf(pszIconLoc,_T("%s,%i"),szModule,-(int)nIconResID); /* id may be 0, buffer safe */ + mir_sntprintf(pszIconLoc, _tcslen(pszIconLoc), _T("%s,%i"), szModule, -(int)nIconResID); /* id may be 0, buffer safe */ } return pszIconLoc; } -- cgit v1.2.3