Use snprintf rather than sprintf. From pvaldes.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-11-07 02:41:16 +00:00
parent 590ae4c685
commit 276fd24258
41 changed files with 623 additions and 222 deletions

View File

@@ -767,7 +767,7 @@ static int show_numeric_list (int numeric)
if (numeric)
{
sprintf(buf, "%3.3u", numeric);
snprintf(buf, sizeof buf, "%3.3u", numeric);
if ((tmp = find_numeric_list(numeric)))
{
for (list = tmp->list; list; list = list->next, cnt++)
@@ -888,7 +888,7 @@ int BX_do_hook (int which, char *format, ...)
{
va_list args;
va_start (args, format);
vsnprintf(buffer, BIG_BUFFER_SIZE * 5, format, args);
vsnprintf(buffer, sizeof buffer, format, args);
va_end(args);
}
else