1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 20:33:13 +02:00

Fix for bug 985, secure calls to SendMessage.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1916 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-01-05 08:15:24 +00:00
parent 73bd4f99ca
commit 6e3a5ade35
2 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -123,8 +123,7 @@ int m_privmsg(const char *source, const char *receiver, const char *msg)
/* Two lookups naughty, however, this won't happen often. -- w00t */
if (findbot(receiver))
{
ircdproto->SendMessage(findbot(receiver), source,
getstring(NULL, USER_RECORD_NOT_FOUND));
ircdproto->SendMessage(findbot(receiver), source, "%s", getstring(NULL, USER_RECORD_NOT_FOUND));
}
return MOD_CONT;
}
+4 -4
View File
@@ -127,7 +127,7 @@ void notice_user(char *source, User * u, const char *fmt, ...)
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
u->SendMessage(source, buf);
u->SendMessage(source, "%s", buf);
va_end(args);
}
@@ -151,7 +151,7 @@ void notice_list(char *source, char *dest, char **text)
* with a single space.
*/
if (**text) {
u->SendMessage(source, *text);
u->SendMessage(source, "%s", *text);
} else {
u->SendMessage(source, " ");
}
@@ -193,7 +193,7 @@ void notice_lang(const char *source, User * dest, int message, ...)
if (*s)
*s++ = 0;
dest->SendMessage(source, *t ? t : " ");
dest->SendMessage(source, "%s", *t ? t : " ");
}
va_end(args);
}
@@ -239,7 +239,7 @@ void notice_help(const char *source, User * dest, int message, ...)
strscpy(outbuf, t, sizeof(outbuf));
strnrepl(outbuf, sizeof(outbuf), "\1\1", source);
dest->SendMessage(source, *outbuf ? outbuf : " ");
dest->SendMessage(source, "%s", *outbuf ? outbuf : " ");
}
va_end(args);
}