Kevin Easton
9a2792345f
Fix crash and memory leak in $aliasctl(COMMAND MATCH)
...
glob_commands() would run off the end of the irc_command array if given a match that matched
the last command. It also leaked memory because it used m_s3cat() to construct the string,
then passed that to m_strdup().
This fixes these problems by reworking glob_commands(), and at the same time removes the use
of alloca() and wild_match() by using strncmp() instead to match the start of a string. Move
glob_commands() to alias.c and make it static since it's only used for aliasctl().
Change the 'name' argument of find_command() and find_dll_command() to const char * at the same
time, so that glob_commands()'s prefix argument can be const char * too.
2016-10-15 00:41:34 +11:00
..
2016-10-15 00:41:34 +11:00
2016-10-15 00:17:31 +11:00
2008-02-25 09:25:32 +00:00
2016-10-01 01:37:27 +10:00
2008-02-25 09:25:32 +00:00
2016-10-09 23:22:18 +11:00
2015-06-24 23:20:53 +10:00
2016-10-14 00:56:03 +11:00
2016-03-17 21:39:17 +11:00
2008-02-25 09:49:14 +00:00
2011-05-02 11:43:38 +00:00
2016-05-07 00:44:29 +10:00
2016-10-15 00:41:34 +11:00
2013-11-13 11:43:57 +00:00
2014-10-26 13:08:43 +00:00
2015-10-28 21:46:38 +11:00
2015-10-29 22:17:10 +11:00
2013-11-07 03:00:24 +00:00
2008-02-25 09:25:32 +00:00
2013-10-14 14:10:26 +00:00
2016-02-24 16:52:33 +11:00
2016-09-29 01:11:29 +10:00
2016-09-30 23:44:15 +10:00
2008-02-25 09:49:14 +00:00
2013-11-11 21:20:39 +00:00
2016-03-31 23:55:14 +11:00
2015-10-04 09:06:38 +11:00
2016-03-24 11:21:09 +11:00
2008-02-25 09:49:14 +00:00
2013-11-07 03:00:24 +00:00
2015-10-28 21:42:33 +11:00
2008-02-25 09:25:32 +00:00
2013-11-07 03:00:24 +00:00
2008-02-25 09:49:14 +00:00
2016-03-31 23:55:14 +11:00
2014-10-27 12:05:16 +00:00
2013-10-20 18:32:07 +00:00
2015-06-20 00:03:15 +10:00
2016-03-24 11:21:09 +11:00
2016-10-13 01:44:29 +11:00
2008-02-25 09:25:32 +00:00
2013-11-17 21:37:32 +00:00
2015-09-02 23:39:53 +10:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:49:14 +00:00
2013-11-11 21:29:21 +00:00
2016-08-02 23:36:01 +10:00
2016-05-15 22:43:01 +10:00
2010-06-26 08:18:34 +00:00
2016-03-24 11:21:09 +11:00
2016-03-08 23:53:16 +11:00
2015-06-13 23:29:00 +10:00
2016-05-10 18:30:55 +10:00
2013-11-11 21:29:05 +00:00
2016-05-25 23:38:11 +10:00
2008-02-25 09:25:32 +00:00
2016-04-14 21:51:49 +10:00
2016-05-15 22:43:01 +10:00
2013-11-07 03:00:24 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:49:14 +00:00
2009-11-24 10:21:30 +00:00
2013-11-13 11:43:57 +00:00
2016-03-16 23:50:38 +11:00
2016-10-13 01:36:19 +11:00
2008-02-25 09:49:14 +00:00
2016-04-06 21:33:06 +10:00
2011-02-02 12:34:13 +00:00
2015-06-07 00:03:09 +10:00
2016-03-24 11:21:09 +11:00
2014-11-06 10:25:37 +00:00
2015-06-07 00:03:09 +10:00
2013-11-07 03:00:24 +00:00
2015-10-20 23:12:33 +11:00
2016-03-24 11:21:09 +11:00
2015-06-12 16:57:19 +10:00
2015-10-04 09:06:38 +11:00
2016-03-24 11:21:09 +11:00
2008-02-25 09:25:32 +00:00
2016-03-16 23:50:38 +11:00
2013-09-21 05:12:43 +00:00
2013-11-13 11:43:57 +00:00
2008-02-25 09:25:32 +00:00