git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1762
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2007-02-03 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/ircd_reply.c (protocol_violation): Avoid reusing the
+ va_list in vd.
+
+ * ircd/send.c (sendcmdto_channel_butone): Warn against using %v in
+ the pattern -- that will cause incorrect behavior.
+ (sendwallto_group_butone): Likewise.
+ (sendcmdto_match_butone): Likewise.
+
2007-01-22 Michael Poole <mdpoole@troilus.org>
* ircd/channel.c (find_delayed_joins): New function.
2007-01-22 Michael Poole <mdpoole@troilus.org>
* ircd/channel.c (find_delayed_joins): New function.
int protocol_violation(struct Client* cptr, const char* pattern, ...)
{
struct VarData vd;
int protocol_violation(struct Client* cptr, const char* pattern, ...)
{
struct VarData vd;
assert(pattern);
assert(cptr);
vd.vd_format = pattern;
va_start(vd.vd_args, pattern);
assert(pattern);
assert(cptr);
vd.vd_format = pattern;
va_start(vd.vd_args, pattern);
-
- sendwallto_group_butone(&me, WALL_DESYNCH, NULL,
- "Protocol Violation from %s: %v", cli_name(cptr), &vd);
-
+ ircd_snprintf(NULL, message, sizeof(message),
+ "Protocol Violation from %s: %v", cli_name(cptr), &vd);
+
+ sendwallto_group_butone(&me, WALL_DESYNCH, NULL, "%s", message);
/** Send a (prefixed) command to all users on this channel, except for
* \a one and those matching \a skip.
/** Send a (prefixed) command to all users on this channel, except for
* \a one and those matching \a skip.
+ * @warning \a pattern must not contain %v.
* @param[in] from Client originating the command.
* @param[in] cmd Long name of command.
* @param[in] tok Short name of command.
* @param[in] from Client originating the command.
* @param[in] cmd Long name of command.
* @param[in] tok Short name of command.
}
/** Send a (prefixed) WALL of type \a type to all users except \a one.
}
/** Send a (prefixed) WALL of type \a type to all users except \a one.
+ * @warning \a pattern must not contain %v.
* @param[in] from Source of the command.
* @param[in] type One of WALL_DESYNCH, WALL_WALLOPS or WALL_WALLUSERS.
* @param[in] one Client direction to skip (or NULL).
* @param[in] from Source of the command.
* @param[in] type One of WALL_DESYNCH, WALL_WALLOPS or WALL_WALLUSERS.
* @param[in] one Client direction to skip (or NULL).
}
/** Send a (prefixed) command to all users matching \a to as \a who.
}
/** Send a (prefixed) command to all users matching \a to as \a who.
+ * @warning \a pattern must not contain %v.
* @param[in] from Source of the command.
* @param[in] cmd Long name of command.
* @param[in] tok Short name of command.
* @param[in] from Source of the command.
* @param[in] cmd Long name of command.
* @param[in] tok Short name of command.