Fix the /TKB (timed kickban) command.

An incorrect pointer was being passed to malloc_sprintf(), causing a
crash.  Use m_sprintf() instead.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@471 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-11-16 03:13:26 +00:00
parent 5a3a74d38a
commit ffea653764
2 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* Fix the /TKB (timed kickban) command. (caf)
* Rewrite termcap/terminfo detection logic in configure and include term.h
in term.c for the system definition of tparm(). This fixes a crash on
NetBSD x86-64 (reported by jeezy), and should also ensure that terminfo

View File

@@ -1021,16 +1021,16 @@ BUILT_IN_COMMAND(kickban)
reset_display_target();
return;
}
if (command && (!my_stricmp(command, "TBK") || !my_stricmp(command, "TKB")))
{
char *string_time;
time = get_cset_int_var(chan->csets, BANTIME_CSET);
if ((string_time = next_arg(args, &args)))
time = atoi(string_time);
malloc_sprintf(&rest, "Timed kickban for %s", convert_time(time));
rest = args;
if (rest && !*rest)
rest = NULL;
if (!rest || !*rest)
rest = m_sprintf("Timed kickban for %s", convert_time(time));
}
else
{