1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

rmodifier: prohibit names beginning with "#" for rmodifiers

This commit is contained in:
Sebastien Helleu
2012-06-04 10:06:46 +02:00
parent c681c660c6
commit 231ee3fa3d
18 changed files with 69 additions and 43 deletions
+3 -1
View File
@@ -263,9 +263,11 @@ rmodifier_new (const char *name, const char *modifiers, const char *str_regex,
struct t_rmodifier *new_rmodifier, *ptr_rmodifier;
regex_t *regex;
if (!name || !name[0] || !modifiers || !modifiers[0]
if (!name || !name[0] || (name[0] == '#') || !modifiers || !modifiers[0]
|| !str_regex || !str_regex[0])
{
return NULL;
}
regex = malloc (sizeof (*regex));
if (!regex)