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

@@ -465,7 +465,6 @@ BUILT_IN_COMMAND(lastlog)
if (match)
{
blah = (char *) alloca(strlen(match)+4);
sprintf(blah, "*%s*", match);
}
@@ -594,7 +593,7 @@ int logmsg(unsigned long log_type, char *from, int flag, char *format, ...)
{
va_list ap;
va_start(ap, format);
vsnprintf(msglog_buffer, BIG_BUFFER_SIZE, format, ap);
vsnprintf(msglog_buffer, sizeof msglog_buffer, format, ap);
va_end(ap);
}