diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-25 15:32:06 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-25 15:32:06 +0000 |
commit | a757184e5db3112d3de0b69eec7d39b937e396bc (patch) | |
tree | e903787b3ca3af22a4d95ddf757e178b23da8619 /plugins/Variables/src/parse_alias.cpp | |
parent | 33ebc5347bee5432ca63efb330acdd5a3b82f3fd (diff) |
replace sprintf to mir_snprintf (part 5)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/parse_alias.cpp')
-rw-r--r-- | plugins/Variables/src/parse_alias.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index 233a7f761a..3cbae2373e 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -192,16 +192,17 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { szArgsA = mir_t2a(szArgs);
- szHelp = ( char* )mir_alloc(32 + strlen(szArgsA));
+ int size = 32 + strlen(szArgsA);
+ szHelp = (char *)mir_alloc(size);
memset(szHelp, '\0', 32 + strlen(szArgsA));
- sprintf(szHelp, LPGEN("Alias")"\t(%s)\t"LPGEN("user defined"), szArgsA);
+ mir_snprintf(szHelp, size, LPGEN("Alias")"\t(%s)\t"LPGEN("user defined"), szArgsA);
res = registerIntToken(alias, parseTranslateAlias, TRF_FUNCTION|TRF_UNPARSEDARGS, szHelp);
mir_free(szArgsA);
}
else {
szHelp = ( char* )mir_alloc(32);
memset(szHelp, '\0', 32);
- sprintf(szHelp, LPGEN("Alias")"\t\t"LPGEN("user defined"));
+ mir_snprintf(szHelp, 32, LPGEN("Alias")"\t\t"LPGEN("user defined"));
res = registerIntToken(alias, parseTranslateAlias, TRF_FIELD|TRF_UNPARSEDARGS, szHelp);
}
mir_free(szArgs);
|