aboutsummaryrefslogtreecommitdiffstats
path: root/irc_channel.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-28 10:37:01 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-28 10:37:01 +0100
commita670aeb34e4f3c4a1fd910aa5944fed4f9c20d7a (patch)
treedc17ef87f59b630d517d71b9b6cac4266735da73 /irc_channel.c
parentab6006cfec72ae8669c68f2892cf1c9994740c92 (diff)
An empty string is not a valid channel name.
Diffstat (limited to 'irc_channel.c')
-rw-r--r--irc_channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/irc_channel.c b/irc_channel.c
index fc89ddd3..a241847d 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -310,6 +310,9 @@ gboolean irc_channel_name_ok( const char *name_ )
const unsigned char *name = (unsigned char*) name_;
int i;
+ if( name_[0] == '\0' )
+ return FALSE;
+
/* Check if the first character is in CTYPES (#&) */
if( strchr( CTYPES, name_[0] ) == NULL )
return FALSE;