Fix a +o mode parsing error.
[srvx.git] / src / proto-p10.c
index a5d61e47664f133e2765650ec40dae2f3397d25b..595bd142f7a61fab6020e299d41b22025df096d9 100644 (file)
@@ -2274,6 +2274,8 @@ mod_chanmode_parse(struct chanNode *channel, char **modes, unsigned int argc, un
             char *oplevel_str;
             int oplevel;
 
+            if (in_arg >= argc)
+                goto error;
             oplevel_str = strchr(modes[in_arg], ':');
             if (oplevel_str)
             {