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
..
2008-02-25 09:49:14 +00:00
2016-10-15 00:17:31 +11:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:25:32 +00:00
2016-05-25 23:38:11 +10:00
2016-10-15 00:41:34 +11:00
2015-06-16 13:23:36 +10:00
2016-03-31 23:55:14 +11:00
2008-05-07 11:07:31 +00:00
2015-10-28 21:46:38 +11:00
2008-02-25 09:25:32 +00:00
2016-03-20 23:48:31 +11:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +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
2008-02-25 09:25:32 +00:00
2008-02-25 09:25:32 +00:00
2015-10-28 21:42:33 +11:00
2008-02-25 09:49:14 +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
2008-02-25 09:49:14 +00:00
2016-03-31 23:55:14 +11:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:25:32 +00:00
2015-06-20 00:03:15 +10:00
2016-10-08 00:35:46 +11:00
2016-03-17 21:39:17 +11:00
2016-10-13 01:44:29 +11:00
2013-11-10 12:00:08 +00:00
2008-02-25 09:25: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
2008-02-25 09:49:14 +00:00
2015-10-28 21:46:38 +11:00
2010-06-26 08:18:34 +00:00
2016-10-15 00:41:34 +11:00
2014-10-29 14:07:05 +00:00
2010-09-30 13:26:06 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +00:00
2016-03-24 11:21:09 +11:00
2012-06-02 14:53:37 +00:00
2016-04-14 21:51:49 +10:00
2008-02-25 09:49:14 +00:00
2008-02-25 09:25:32 +00:00
2008-02-25 09:49:14 +00:00
2015-06-19 23:12:10 +10:00
2016-10-13 01:36:19 +11: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
2016-03-17 21:39:17 +11:00
2015-06-07 00:03:09 +10:00
2015-06-07 00:03:09 +10:00
2008-02-25 09:49:14 +00:00
2015-10-20 23:12:33 +11:00
2015-06-12 15:54:43 +10:00
2008-02-25 09:25:32 +00:00
2009-10-16 12:35:56 +00:00
2008-02-25 09:25:32 +00:00
2008-04-30 13:57:56 +00:00